fix for bug #996 and related issues #1011

Merged
merged 1 commit into from Jul 15, 2012

3 participants

@mdehoon

This is a fix for bug #996 (macosx backend broken by #901: QuadMesh fails so colorbar fails) and a few related issues.

@efiring efiring merged commit 408c529 into matplotlib:master Jul 15, 2012
@pelson pelson commented on the diff Jul 16, 2012
lib/matplotlib/backends/backend_macosx.py
@@ -63,42 +63,34 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position):
- cliprect = gc.get_clip_rectangle()
- clippath, clippath_transform = gc.get_clip_path()
- if all_transforms:
- transforms = [numpy.dot(master_transform, t) for t in all_transforms]
+ if offset_position=='data':
@pelson
Matplotlib Developers member
pelson added a line comment Jul 16, 2012

I know its been merged already, but its worth mentioning that the lines:

if offset_position=='data':
    offset_position = True
else:
   offset_position = False

are exactly equivalent to:

offset_position = (offset_position=='data')

(un-necessary parentheses added for readability)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pelson
Matplotlib Developers member

Out of interest, is the OSX backend purely graphical or would it be possible to add some unit tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment