10000 Corrected cax attributes of ImageGrid axes · matplotlib/matplotlib@695f90e · GitHub
[go: up one dir, main page]

Skip to content

Commit 695f90e

Browse files
committed
Corrected cax attributes of ImageGrid axes
1 parent d8b2924 commit 695f90e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/mpl_toolkits/axes_grid1/axes_grid.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,13 @@ def __init__(self, fig,
640640
if self._colorbar_mode == "single":
641641
for ax in self.axes_all:
642642
ax.cax = self.cbar_axes[0]
643+
elif self._colorbar_mode == "edge":
644+
for index, ax in enumerate(self.axes_all):
645+
col, row = self._get_col_row(index)
646+
if self._direction == "row":
647+
ax.cax = self.cbar_axes[row]
648+
else:
649+
ax.cax = self.cbar_axes[col]
643650
else:
644651
for ax, cax in zip(self.axes_all, self.cbar_axes):
645652
ax.cax = cax

0 commit comments

Comments
 (0)
0