"nicky van foreest" <[EMAIL PROTECTED]> 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


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to