[Numpy-discussion] Producing a Histogram When Bins Are Known

Sebastian sebas0@gmail....
Fri Nov 27 13:29:51 CST 2009


Did you try using the parameter range?
I do something like this.
regards

ax = fig.add_subplot(1,1,1)
> pylab.title(r'\Large  BCG NO radio distribution $ \rm{TITLE}$')
> n, bins, patches = pylab.hist(values, bins=math.sqrt(len(values)),
> range=(numpy.mean(values)-3*scientificstat.standardDeviation(values),numpy.mean(values)+3*scientificstat.standardDeviation(values)),
> normed=1, facecolor='y', alpha=0.5)
> ax.set_xlabel(r'\Large$ \rm{values}$')
> ax.set_ylabel(r'\Large Delatavalue/Value')
>
>
> gausx=numpy.arange(numpy.mean(Value)-3*scientificstat.standardDeviation(Value),numpy.mean(Value)+3*scientificstat.standardDeviation(bpty_plt),0.1)
>
> gaus=normpdf(gausx,numpy.mean(Value),scientificstat.standardDeviation(Value))
> pylab.plot(gausx,gaus, color='red', lw=2)
> ax.set_xlim(-1.5, 1.5)
> ax.grid(True)
>

On Fri, Nov 27, 2009 at 4:38 PM, Christopher Barker
<Chris.Barker@noaa.gov>wrote:

> josef.pktd@gmail.com wrote:
> > On Fri, Nov 27, 2009 at 12:57 PM, Skipper Seabold <jsseabold@gmail.com>
> wrote:
>
> >>  This kind of info might be useful to other newcomers
> >> somewhere...  <http://www.scipy.org/History_of_SciPy>?  Thoughts on
> >> posting this on the wiki here?
> >
> > I also agree. It will improve with the newly redesigned website for
> scipy.org
> > However, I cannot find the link right now for the development version of
> > the new website.
>
> Feel free to crib whatever you want from my post for that -- or suggest
> a place for me to put it, and I'll do it. I'm just not sure where it
> should go at this point.
>
> -Chris
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker@noaa.gov
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091127/2b6cb3bb/attachment-0001.html 


More information about the NumPy-Discussion mailing list