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

Bars are not visible in bar plot when log scale is enabled · Issue #9701 · matplotlib/matplotlib · GitHub

Repository navigation

Bars are not visible in bar plot when log scale is enabled #9701

Closed

Description

When enabling log scale for the bar plot, the bars are not plotted properly and the plot is empty.

See also this bug report #163 and the corresponding fix #2147.

Commit dda42ab changed the default value of nonpos parameter from clip to mask which introduced the issue. I cannot tell whether clip should be default behavior or mask doesn't work as intended.

import matplotlib.pyplot as plt
plt.bar(x=[1,2,3], height=[1000,2,3])
plt.yscale("log")
plt.show()

Result is an empty plot. Saving to an image file or PDF doesn't make a change.

Adding

plt.yscale("log", nonposy="clip")

fixes that issue.

Additional info:
Latest Miniconda
Various platforms (Ubuntu 16.04, Windows 10, macOS)
Matplotlib 2.1.0, Qt5Agg (from Anaconda)

Activity

  1. afvincent commented on Nov 6, 2017

    Contributor

    Thank you for the nice report.

    If I am correct this is a duplicate of #9288 and #9628, and the issue was fixed by #9477. Your MWE is working fine with Matplotlib from the current master branch and will be OK with Matplotlib 2.1.1, which should be shipped in aa very near future :).

    Closing, but feel free to reopen if you think I was mistaken.

  2. added this to the v2.1.1 milestone on Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL