Skip to content

Reverted a previous change to artist transform setting. Fixes legend bug. #1176

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 1 commit into from
Sep 11, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 2 additions & 6 deletions lib/matplotlib/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,14 +622,15 @@ def _init_legend_box(self, handles, labels):
#xdescent, ydescent, width, height,
fontsize,
handlebox)

handle_list.append(handle)

handleboxes.append(handlebox)

if len(handleboxes) > 0:

# We calculate number of rows in each column. The first
# (num_largecol) columns will have (nrows+1) rows, and remaing
# (num_largecol) columns will have (nrows+1) rows, and remaining
# (num_smallcol) columns will have (nrows) rows.
ncol = min(self._ncol, len(handleboxes))
nrows, num_largecol = divmod(len(handleboxes), ncol)
Expand Down Expand Up @@ -685,7 +686,6 @@ def _init_legend_box(self, handles, labels):
self.texts = text_list
self.legendHandles = handle_list


def _auto_legend_data(self):
"""
Returns list of vertices and extents covered by the plot.
Expand Down Expand Up @@ -785,7 +785,6 @@ def get_window_extent(self, *args, **kwargs) :
'return a extent of the the legend'
return self.legendPatch.get_window_extent(*args, **kwargs)


def get_frame_on(self):
"""
Get whether the legend box patch is drawn
Expand All @@ -809,7 +808,6 @@ def get_bbox_to_anchor(self):
else:
return self._bbox_to_anchor


def set_bbox_to_anchor(self, bbox, transform=None):
"""
set the bbox that the legend will be anchored.
Expand Down Expand Up @@ -841,8 +839,6 @@ def set_bbox_to_anchor(self, bbox, transform=None):
self._bbox_to_anchor = TransformedBbox(self._bbox_to_anchor,
transform)



def _get_anchored_bbox(self, loc, bbox, parentbbox, renderer):
"""
Place the *bbox* inside the *parentbbox* according to a given
Expand Down
Loading