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

ax.fill_between broken for log scale and values below zero #9457

Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
@hsandmeyer

Description

@hsandmeyer

ax.fill broken for log scale and values below zero

When using ax.fill_between in log scale plots with y-values below zero, the result looks broken and areas are filled that should not be filled

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltxdata=np.arange(0,10,0.01)ydata=np.exp(-xdata)edata=0.2*(10-xdata)*np.cos(5*xdata)*np.exp(-xdata)fig,ax=plt.subplots()plt.yscale('log')ax.fill_between(xdata,ydata-edata,ydata+edata)plt.savefig("test.png")

Actual outcome

broken

Expected outcome

correct
The correct example has been generated with matplotlib-2.0.2-1

Probably related:#8623
How to deal with invalid values in log scale plots is certainly a matter of definition. However, it should never happen that areas are filled that should not be filled, as it is the case in the example above.

Matplotlib version

  • Operating system: arch linux
  • Matplotlib version: 2.1.0-1
  • Matplotlib backend: Qt5Agg
  • Python version: 3.6.2
  • Other libraries: numpy version: 1.13.3-1

Everything installed using the package manager of arch linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp