开发者

Weird graphics in matplotlib when changing the scale

开发者 https://www.devze.com 2022-12-23 00:56 出处:网络
I get a histogram pict开发者_开发百科ure in matplotlib which looks great. Now I realize I need a log scale on the y-axis, so I just add to the code:

I get a histogram pict开发者_开发百科ure in matplotlib which looks great. Now I realize I need a log scale on the y-axis, so I just add to the code:

ax.set_yscale('log')

but then, the histogram bars dissapear and I only get some sparse points, do you know waht could be the reason?

Thanks


Use hist's log=True keyword argument instead. This is a FAQ in matplotlib-user list :)

0

精彩评论

暂无评论...
验证码 换一张
取 消