Skip to content

Commit cfe5ca6

Browse files
committed
fix the bug that handles for scatter are incorrectly set when dpi!=72. Thanks to Ray Speth for the bug report.
svn path=/branches/v0_99_maint/; revision=8191
1 parent f304ef5 commit cfe5ca6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2010-03-13 fix the bug that handles for scatter are incorrectly set when
2+
dpi!=72. Thanks to Ray Speth for the bug report. -JJL
3+
14
===============================================
25
2009-09-21 Tagged for release 0.99.1
36

lib/matplotlib/legend.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,13 @@ def _init_legend_box(self, handles, labels):
580580

581581
handle = handle_list[-1]
582582
handlebox.add_artist(handle)
583+
584+
# special case for collection instances
585+
if isinstance(handle, RegularPolyCollection) or \
586+
isinstance(handle, CircleCollection):
587+
handle._transOffset = handlebox.get_transform()
588+
handle.set_transform(None)
589+
583590
if hasattr(handle, "_legmarker"):
584591
handlebox.add_artist(handle._legmarker)
585592
handleboxes.append(handlebox)

0 commit comments

Comments
 (0)