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]: Poor rendering of Poly3DCollection with axlim clipping #29373

Open
@scottshambaugh

Description

@scottshambaugh

Bug summary

When plottingPoly3DCollection withaxlim_clip=True, the patch is split into multiple patches and renders poorly.

I am leaning towards this being the "correct" behavior, but want to open the bug report to document it and see if anyone has a solution that solves this cleanly.

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotasplt# Generate some random datanp.random.seed(42)x=np.arange(10)y=np.zeros_like(x)z=np.random.randint(5,10,10)fig,ax=plt.subplots(1,1,subplot_kw={'projection':'3d'})ax.fill_between(x,y,z,x,0,0,axlim_clip=True)ax.set_xlim(0,8)plt.show()

Actual outcome

image

Expected outcome

image

Additional information

There are two workarounds for this particular example:

  1. Restrict the data to the x=[0, 8] range before plotting.
  2. Usefill_between with thequad mode like so:
ax.fill_between(x,y,z,x,0,0,axlim_clip=True,mode='quad',shade=False)

Matplotlib Version

3.10.0

Installation

git checkout

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