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

Some subplot axes not displaying when using both gridspec_kw/width_ratios and subplot2grid #11434

Closed
@tiffanygwilson

Description

@tiffanygwilson

Bug report

Bug summary

When using a combination ofplt.subplots withgridspec_kw/width_ratios along withplt.subplot2grid, some of the axes disappear when one of the width ratios is (in this case) below 0.73.

Code for reproduction

importmatplotlib.pyplotaspltfig,ax=plt.subplots(2,3,sharex=True,sharey=True,gridspec_kw={'width_ratios':[1,1,0.7]})axi=plt.subplot2grid((2,3),(0,2),rowspan=2)plt.show()

Actual outcome

image

Note that the axes only disappear with the call tosubplot2grid. If I remove that line, all axes appear.

Expected outcome

Ifwidth_ratios is instead[1,1,0.8], all of the axes appear.
image

I can achieve the desired width ratios if I useGridSpec directly instead of using the wrappers, but it would be nice if the wrappers didn't fail based on thewidth_ratios parameter.

Matplotlib version

  • Operating system: Windows 10.0.15063
  • Matplotlib version: 2.1.0
  • Matplotlib backend: module://ipykernel.pylab.backend_inline
  • Python version: 3.6.3
  • IPython version: 6.1.0
  • Jupyter notebook server version: 5.4.1

mabplotlib and python installed via 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