I have a small code producing the following picture with this code:
Code 1:
hist, rhist = np.histogram(r, bins=40, range=(0, 0.25))
hist = -hist/np.trapz(rhist[:-1],hist)
plt.plot(rhist[:-1], hist)
Output of code 1:
Then I try setting the plot to have a logarithmic Y axis so that I can recognise small peaks more clearly. This is the result.
Code 2:
hist, rhist = np.histogram(r, bins=40, range=(0, 0.25))
hist = -hist/np.trapz(rhist[:-1],hist)
plt.semilogy(rhist[:-1], hist)
Output of code 2:
As you can see, part of my plot disappears. There are 40 bins, I can however only count about 15 in the new plot. Any help will be greatly appreciated. I am using Enthought Canopy of the latest version for academic use. E.
UPDATE: I did find a similar question here, old, dead and unanswered though.