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]:fill_between withget_xaxis_transform increases y-limits #30320

Open
@metachow

Description

@metachow

Bug summary

In matplotlib 3.10.0, usingfill_between() withtransform=ax.get_xaxis_transform() increases the y-limits every time it is called, and the original plot gets squeezed gradually, which did not happen in previous version (3.8.0).

Code for reproduction

#Modified from https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_demo.htmlimportmatplotlib.pyplotaspltimportnumpyasnpfig,ax=plt.subplots()x=np.arange(0,4*np.pi,0.01)y=np.sin(x)ax.plot(x,y,color='black')threshold=0.75ax.axhline(threshold,color='green',lw=2,alpha=0.7)foriinrange(10):ax.fill_between(x+0.5*i,0,1,where=y>threshold,color='green',alpha=0.1,transform=ax.get_xaxis_transform())

Actual outcome

Image

Expected outcome

Image

Additional information

The expected outcome is from version 3.8.0

Operating system

Window 11

Matplotlib Version

3.10.0

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

Python 3.12.11

Jupyter version

7.4.4

Installation

None

Metadata

Metadata

Assignees

No one assigned

    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