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

Default bottom of Stepfilled histograms should be set according to ymin · Issue #4621 · matplotlib/matplotlib · GitHub

Repository navigation

Default bottom of Stepfilled histograms should be set according to ymin #4621

Closed

Description

Follow up to #4606 and #4608

Compare bar:

import numpy
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1,1)
hist1 = ax.hist(1, bins=1, normed=False, log=True, histtype='bar', label='No bottom', alpha=1, facecolor='red')
offset = 1e-9
ax.set_ylim(1e-4, 1.1)
ax.legend()
plt.show()

to stepfilled:

import numpy
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1,1)
hist1 = ax.hist(1, bins=1, normed=False, log=True, histtype='stepfilled', label='No bottom', alpha=1, facecolor='red')
offset = 1e-9
ax.set_ylim(1e-4, 1.1)
ax.legend()
plt.show()

Setting bottom is not really a correct solution since it shifts the top of the bar with the same amount

Activity

  1. modified the milestones: , on Jul 11, 2015
  2. petehuang commented on Jan 10, 2017

    Contributor

    @jenshnielsen can you update the second code snippet? I think it's the same as the first. Thanks :)

  3. jenshnielsen commented on Jan 10, 2017

    MemberAuthor

    I don't remember this but I think it should be correct now

  4. added
    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    on Jan 10, 2017
  5. tacaswell commented on Jan 10, 2017

    Member

    Tagged as medium difficulty because hist.

  6. modified the milestones: , on Oct 3, 2017
  7. Dhrumil0 commented on Feb 14, 2018

    I was interested in working on this. Can you please verify some things. Currently, the bottom is set to be 1/logbase by default for a stepfilled graph set to a log scale. If the bottom parameter is provided, it's value is used instead. This seems to be the intended behaviour from the comments in the code. Is it supposed to be set to the lower ylim value instead when bottom isn't given?

  8. anntzer commented on Feb 14, 2018

    Contributor

    Probably the correct fix is some variant of #9477.

  9. Dhrumil0 commented on Feb 14, 2018

    I think this issue is somewhat different. Can you please clarify how the step filled histogram is supposed to behave when bottom isn't set. The code is setting the default to 1/ logbase which seems to be reasonable.

  10. modified the milestones: needs sorting, v3.2.0 on Aug 14, 2019
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

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL