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

'stepfilled' histogram is not filled properly when setting yscale('log') #1727

Closed
gitcheng opened this issue Jan 31, 2013 · 3 comments
Closed

Comments

@gitcheng
Copy link

I am using 1.3.x that I just cloned today. The histogram is not filled properly in log scale if I set yscale('log'). However, if I use hist(..., log=True), it looks fine.

import matplotlib.pyplot as plt
import numpy as np
x= np.arange(10)
plt.subplot(211)
plt.yscale('log')
plt.hist(x, weights=x, histtype='stepfilled')
plt.title('Use yscale(\'log\')')
plt.subplot(212)
plt.hist(x, weights=x, histtype='stepfilled', log=True)
plt.title('Use hist(..., log=True)')
plt.show()

stepfilled_log

@neggert
Copy link
Contributor

neggert commented Feb 1, 2013

This has been around for a while. I've been working around it by doing.

ax.set_yscale('log', nonposy='clip')

Then you can call hist normally.

@neggert
Copy link
Contributor

neggert commented Mar 1, 2013

This should be fixed in v1.2.x, now that #1724 has been merged.

@dmcdougall
Copy link
Member

Thanks @neggert, closing.

@gitcheng If in fact the problem persists, please feel free to re-open this ticket and we can investigate further. Thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants