Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
I was playing with@timhoffm's new example at#28546 and found that, with QtAgg, when I hit the "configure subplots" button the image subplots immediately move downwards.
Code for reproduction
importmatplotlib.pyplotaspltimportnumpyasnpfrommatplotlibimportcolorsnp.random.seed(19680801)datasets= [ (i+1)/10*np.random.rand(10,20)foriinrange(4)]fig,axs=plt.subplots(2,2)fig.suptitle('Multiple images')# create a single norm to be shared across all imagesnorm=colors.Normalize(vmin=np.max(datasets),vmax=np.min(datasets))images= []forax,datainzip(axs.flat,datasets):images.append(ax.imshow(data,norm=norm))fig.colorbar(images[0],ax=axs,orientation='horizontal',fraction=.1)plt.show()
Actual outcome
Initially I get the expected plot
but when I hit the "Configure subplots" button, without changing any subplot settings I have
Expected outcome
Subplots don't move until I tell them!
Additional information
I have reproduced this back to v3.6.3 with QtAgg (I haven't tested further back). I cannot reproduce with TkAgg.
Operating system
Ubuntu
Matplotlib Version
main
, 3.8.4, 3.6.3
Matplotlib Backend
QtAgg
Python version
3.9.19, 3.12.3, 3.11.6
Jupyter version
N/A
Installation
conda
Metadata
Metadata
Assignees
Labels
No labels