Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: QtAgg - "Configure subplots" button immediately moves subplots #28553

Open
@rcomer

Description

@rcomer

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
image

but when I hit the "Configure subplots" button, without changing any subplot settings I have

image

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp