-1

I'm trying to plot a histogram of a list of 48103 positive integers, ranging from 1 to over 400,000. If I use the default settings, I get the following thoroughly unhelpful plot:

enter image description here

The following question explains how to make the x-axis logarithmic: plotting a histogram on a Log scale with Matplotlib

But I don't think that will be enough. I need to make the y-axis logarithmic too.

How do I do that?

Thanks

Community
  • 1
  • 1
J.D.
  • 139
  • 4
  • 14

1 Answers1

0

Ok, this works:

plt.hist(data,bins=[1,10,100,1000,10000,100000,1000000])
plt.xscale('log')
plt.yscale('log')
plt.show()```
J.D.
  • 139
  • 4
  • 14