Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong xlim for bar plot with just one bin #36

Closed
janpipek opened this issue Apr 16, 2017 · 0 comments
Closed

Wrong xlim for bar plot with just one bin #36

janpipek opened this issue Apr 16, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@janpipek
Copy link
Owner

janpipek commented Apr 16, 2017

In this degenerate case, xlim for a bar matplotlib plot is set to (0, 1):

import matplotlib.pyplot as plt
from physt.histogram1d import Histogram1D
h = Histogram1D([0, 10], [1])
h.plot()
plt.show()

However, this works:

import matplotlib.pyplot as plt
plt.bar([0], [1], [10], align="edge")
plt.show()
@janpipek janpipek added the bug label Apr 16, 2017
@janpipek janpipek self-assigned this Apr 16, 2017
@janpipek janpipek added this to the 0.4 milestone Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant