weird line in histogram

"nicky van foreest" <vanforeest@...287...> writes:

I try to plot a histogram, which succeeds nicely, but I also get a
strange line in the same plot. Does anybody know why this is the case,
and what to do about it? Here is the code:

    n, bins, patches = hist(res,bins = 10, cumulative=True, normed=False)
    l = plot(bins)
    show()

Just omit plot(bins) from your script. The hist function (in pylab)
already draws the histogram, and plot(bins) adds the extra line. Use
numpy.histogram if you just want to compute the histogram.

The docstring of hist says "Compute the histogram of *x*", which is
misleading because it draws the histogram. I'll fix the docstring.

···

--
Jouni K. Sepp�nen
http://www.iki.fi/jks