Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bcc9ead

Browse filesBrowse files
committed
BUG: Fixes issue matplotlib#966. When appending the new axes, there is a bug where 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.
1 parent 76f902c commit bcc9ead
Copy full SHA for bcc9ead

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎lib/mpl_toolkits/axes_grid1/axes_divider.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axes_grid1/axes_divider.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,10 @@ def new_horizontal(self, size, pad=None, pack_start=False, **kwargs):
554554
if pack_start:
555555
self._horizontal.insert(0, size)
556556
self._xrefindex += 1
557-
locator = self.new_locator(nx=0, ny=0)
557+
locator = self.new_locator(nx=0, ny=self._yrefindex)
558558
else:
559559
self._horizontal.append(size)
560-
locator = self.new_locator(nx=len(self._horizontal)-1, ny=0)
560+
locator = self.new_locator(nx=len(self._horizontal)-1, ny=self._yrefindex)
561561

562562
ax = self._get_new_axes(**kwargs)
563563
ax.set_axes_locator(locator)
@@ -601,10 +601,10 @@ def new_vertical(self, size, pad=None, pack_start=False, **kwargs):
601601
if pack_start:
602602
self._vertical.insert(0, size)
603603
self._yrefindex += 1
604-
locator = self.new_locator(nx=0, ny=0)
604+
locator = self.new_locator(nx=self._xrefindex, ny=0)
605605
else:
606606
self._vertical.append(size)
607-
locator = self.new_locator(nx=0, ny=len(self._vertical)-1)
607+
locator = self.new_locator(nx=self._xrefindex, ny=len(self._vertical)-1)
608608

609609
ax = self._get_new_axes(**kwargs)
610610
ax.set_axes_locator(locator)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.