Skip to content

hexbin_demo.py crashes with gtk backend #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix crash in _draw_rotated_text in Gdk backend.
  • Loading branch information
mdboom committed Jun 11, 2012
commit a329dcd8c78f697b68f1a693a4c374b7890b7f20
3 changes: 3 additions & 0 deletions lib/matplotlib/backends/backend_gdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ def _draw_rotated_text(self, gc, x, y, s, prop, angle):
if x < 0 or y < 0: # window has shrunk and text is off the edge
return

if x + w > self.width or y + h > self.height:
return

key = (x,y,s,angle,hash(prop))
imageVert = self.rotated.get(key)
if imageVert != None:
Expand Down