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

Clarify that constrained_layout and tight_layout conflict with each other #17339

Closed
Milestone
@ericpre

Description

@ericpre

Bug report

Bug summary

Not sure if this an expected behaviour, but the colorbar seems to be ignored when usingtight_layout. Example taken from the "Constrained Layout Guide" (https://matplotlib.org/3.1.3/tutorials/intermediate/constrainedlayout_guide.html#colorbars).

Code for reproduction

arr=np.arange(100).reshape((10,10))fig,axs=plt.subplots(2,2,figsize=(4,4),constrained_layout=True)foraxinaxs.flat:im=ax.pcolormesh(arr)fig.colorbar(im,ax=axs,shrink=0.6)plt.tight_layout()

Actual outcome

image

Expected outcome
This is the outcome before callingplt.tight_layout()

image

Matplotlib version

  • Operating system: Fedora 31
  • Matplotlib version: 3.1.3 from conda defaults (3.2.1 from conda-forge behave similarly)
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.7.6
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp