I have a problem while dealing with a data set which the value range from 0 to tens of thousand. And there is no problem to show the histogram of the whole data set using hist(). However, if I only want to show the cumulative and normed detailed histogram using say x = [0, 120], I have to use 600000 bins to assure the detail.
The tricky problem is if I just use the range of (0 ,120) to show normed and cumulative hist, it will end with 1. But actually it is far less than the real ‘1’ since it just normed within this small range of data. Could anyone have some ideas how to utilize the hist() in matplotlib to tackle this problem? I thought this should not be so complicated that I have to write another function to draw the hist I need.
You can set
binsto a list, not an integer, e.g.,bins=[1,2,3,..,120,30000,60000].To answer your commnet below, here is an excerpt from the documentation:
And here is an example with cumulative normalized histogram. Notice the effect of

bins = [100,125,150,160,170,180,190,200,210,220,230,240,250,275,300]on this bar plot, how the first two bars are wider than the middle bars.