FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ax.fill_between broken for log scale and values below zero · Issue #9457 · matplotlib/matplotlib · GitHub

Repository navigation

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

Closed

Description

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

import numpy as np
import matplotlib.pyplot as plt
xdata=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

Expected outcome


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.

Activity

  1. anntzer commented on Oct 18, 2017

    Contributor

    Probably can be fixed by a variant of #9305...
    Edit: now also fixed by #9305.

  2. added this to the v2.1.1 milestone on Oct 18, 2017
  3. added
    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
    on Oct 18, 2017
  4. tacaswell commented on Oct 30, 2017

    Member

    Fixed by #9477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL