8000 Fixes issue #966: When appending the new axes, there is a bug where it by cimarronm · Pull Request #2735 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fixes issue #966: When appending the new axes, there is a bug where it #2735

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 3 commits into from
Mar 20, 2014
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
BUG: Fixes issue #966. When appending the new axes, there is a bug wh…
…ere it

does not account for the reference horizontal locator index when adding
a veritcal axes and does not accout for the reference vertical locator
index when adding a horizontal axes. This fixes that bug so that the
append_axes function adds the axes where it is expected.
  • Loading branch information
cimarronm committed Mar 18, 2014
commit bcc9ead9975e3ad916de19fa48984234f8fa2abe
8 changes: 4 additions & 4 deletions lib/mpl_toolkits/axes_grid1/axes_divider.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ def new_horizontal(self, size, pad=None, pack_start=False, **kwargs):
if pack_start:
self._horizontal.insert(0, size)
self._xrefindex += 1
locator = self.new_locator(nx=0, ny=0)
locator = self.new_locator(nx=0, ny=self._yrefindex)
else:
self._horizontal.append(size)
locator = self.new_locator(nx=len(self._horizontal)-1, ny=0)
locator = self.new_locator(nx=len(self._horizontal)-1, ny=self._yrefindex)

ax = self._get_new_axes(**kwargs)
ax.set_axes_locator(locator)
Expand Down Expand Up @@ -601,10 +601,10 @@ def new_vertical(self, size, pad=None, pack_start=False, **kwargs):
if pack_start:
self._vertical.insert(0, size)
self._yrefindex += 1
locator = self.new_locator(nx=0, ny=0)
locator = self.new_locator(nx=self._xrefindex, ny=0)
else:
self._vertical.append(size)
locator = self.new_locator(nx=0, ny=len(self._vertical)-1)
locator = self.new_locator(nx=self._xrefindex, ny=len(self._vertical)-1)

ax = self._get_new_axes(**kwargs)
ax.set_axes_locator(locator)
Expand Down
0