-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
ImageGrid bug when using inline backend #12370
Copy link
Copy link
Closed
Labels
Description
Bug report
Bug summary
The ImageGrid class seems to not behave correctly since the upgrade to matplotlib 3.0.0 when the inline backend is used in a Jupyter notebook: the resulting subplots fail to arrange in a grid and are placed on top of eachother. The correct behaviour is reproduced if using the notebook or ipympl backends. Thanks!
Code for reproduction
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
import numpy as np
im = np.arange(100)
im.shape = 10, 10
fig = plt.figure(1, (4., 4.))
grid = ImageGrid(fig, 111,
nrows_ncols=(2, 2),
axes_pad=0.1,
)
for i in range(4):
grid[i].imshow(im)
grid[i].set_title('test {0}{0}'.format(i))
plt.show()Expected outcome
Matplotlib version
- Operating system: Debian 9
- Matplotlib version: 3.0.0
- Matplotlib backend:
inline - Python version: 3.5.3
- Jupyter version (if applicable): 4.4.0
- Other libraries:
Reactions are currently unavailable

