|
From: <mik...@gm...> - 2007-02-06 14:33:57
|
Hi! I'm trying to generate some kind of "distribution" view / histogram of decimal numbers, i.e. i want the graph to indicate exactly how many times any given decimal number occurs in "x". As an example, i've set the values to tuple "x" as seen in the code snipplet below. In reality there will be at least couple of thousand decimal values or more in the tuple (x in this example) and values will be retrieved from file etc. This code does seem to draw some kind of histogram but it would be much more usefull to have at least the y-scale as logarithmic. But I haven't found a way to make the scale logarithmic. I've tried to use semilogy/semilogx/loglog but with no success. --------------- x=0.000925,0.000879,0.000926,0.00088,0.001016,0.000931,0.000927,0.00088, 0.000926,0.000926,0.000879,0.0009 n, bins, patches = hist(x, 1000) l = plot(bins, n, 'r--') grid(True) show() ---------------- regards, Mika |