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

Stackplot fails for small numbers #17633

Closed
@svaberg

Description

@svaberg

Bug report

Bug summary

It appears thatstackplot fails for small numbers in version 3.2.1, or at least something goes wrong in my clean installation, see figures below.

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltx=  [0,1]y1=1e-8*np.ones_like(x)y2=1e-9*np.ones_like(x)fig,axs=plt.subplots(2,1)axs[0].stackplot(x,y1,y2)# This plot is fineaxs[1].stackplot(x,y1/10,y2/10)# This plot is wrongplt.show()

Actual outcome
image
Something went wrong in the second subplot.

Expected outcome
Expected this, as generated withmatplotlib version 3.1.2
mpl312

Matplotlib version

  • Operating system: macOS 10.12.6 (Sierra)
  • Matplotlib version: 3.2.1
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: 3.8.3

Created a conda environment with only thenumpy package, then installed matplotlib withpip.

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