10000 FIX: subplotspec and divided axes · matplotlib/matplotlib@52060df · GitHub
[go: up one dir, main page]

Skip to content

Commit 52060df

Browse files
committed
FIX: subplotspec and divided axes
1 parent 97dc499 commit 52060df

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/colorbar.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,12 @@ def __call__(self, ax, renderer):
273273

274274
def get_subplotspec(self):
275275
# make tight_layout happy..
276-
return self._cbar.ax.get_subplotspec()
276+
ss = getattr(self._cbar.ax, 'get_subplotspec', None)
277+
if ss is None:
278+
ss = self._orig_locator.get_subplotspec()
279+
else:
280+
ss = ss()
281+
return ss
277282

278283

279284
class Colorbar:

0 commit comments

Comments
 (0)
0