Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Hello, I've found an unexpected behavior when I make grids of subplots with imshow and tight_layout the second to last plot is missing, for example:
import numpy as npimport matplotlib.pyplot as pltplt.figure()for i in range(16): ax= plt.subplot(4,4 ,i+1) im=ax.imshow(np.random.normal(size=100).reshape([10,10])) plt.tight_layout() plt.title(i)plt.savefig("imshow_4x4.png")
generates:
Whereas the same loop with pcolor works:
import numpy as npimport matplotlib.pyplot as pltplt.figure()for i in range(16): ax= plt.subplot(4,4 ,i+1) im=ax.pcolor(np.random.normal(size=100).reshape([10,10])) plt.tight_layout() plt.title(i)plt.savefig("pcolor_4x4.png")
If I omit the tight_layout() call from the first example it works:
I'm using matplotlib 1.4.3 and numpy 1.9.2 in Anaconda 2.2.0.