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

2009-11-28 Thread Wayne Watson
Yes, the book description is here

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

2009-11-28 Thread josef . pktd
On Sat, Nov 28, 2009 at 6:18 AM, Sebastian wrote: > > > On Sat, Nov 28, 2009 at 1:01 AM, wrote: >> >> On Fri, Nov 27, 2009 at 9:44 PM, Wayne Watson >> wrote: >> > Joseph, >> > That got it by the fig problem but there is yet another one. value is >> > not defined on the very long line: >> > range

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

2009-11-28 Thread Sebastian
On Sat, Nov 28, 2009 at 1:01 AM, wrote: > On Fri, Nov 27, 2009 at 9:44 PM, Wayne Watson > wrote: > > Joseph, > > That got it by the fig problem but there is yet another one. value is > > not defined on the very long line: > > range = ... > >Wayne > > (values is the data array, ... no idea ab

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

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 9:44 PM, Wayne Watson wrote: > Joseph, > That got it by the fig problem but there is yet another one. value is > not defined on the very long line: > range = ... >    Wayne (values is the data array, ... no idea about scientificstat.standardDeviation) Sebastian's example

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

2009-11-27 Thread Wayne Watson
Joseph, That got it by the fig problem but there is yet another one. value is not defined on the very long line: range = ... Wayne josef.p...@gmail.com wrote: > On Fri, Nov 27, 2009 at 9:05 PM, Sebastian wrote: > > ... > you need to create a figure, before you can use it > > fig = pylab.f

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

2009-11-27 Thread Gökhan Sever
On Fri, Nov 27, 2009 at 8:05 PM, Sebastian wrote: > Hi Chris, yeah there should, try the following: > import numpy > import matplotlib.pyplot as pylab > regards > > Shouldn't the 2nd import be: import matplotlib.pyplot as plt ? > > On Fri, Nov 27, 2009 at 8:47 PM, Wayne Watson < > sierra_mtnv

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

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 9:05 PM, Sebastian wrote: > Hi Chris, yeah there should, try the following: > import numpy > import matplotlib.pyplot as pylab > regards > > On Fri, Nov 27, 2009 at 8:47 PM, Wayne Watson > wrote: >> >> I tried this and it put ranges on y from 0 to 0.45 and x from 5 to 50.

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

2009-11-27 Thread Sebastian
Hi Chris, yeah there should, try the following: import numpy import matplotlib.pyplot as pylab regards On Fri, Nov 27, 2009 at 8:47 PM, Wayne Watson wrote: > I tried this and it put ranges on y from 0 to 0.45 and x from 5 to 50. > > import numpy as np > import pylab > > v = np.array([20, 15,10,30

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

2009-11-27 Thread Wayne Watson
I tried this and it put ranges on y from 0 to 0.45 and x from 5 to 50. import numpy as np import pylab v = np.array([20, 15,10,30, 50, 30, 20, 25, 10]) #Plot a normalized histogram print np.linspace(0,50,10) pylab.hist(v, normed=1, bins=np.linspace(0,9,10), range=(0,100)) pylab.show() I added t

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

2009-11-27 Thread Sebastian
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

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

2009-11-27 Thread Wayne Watson
Lots of good suggestions. I'll pull them into a document for further reference. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

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

2009-11-27 Thread Christopher Barker
josef.p...@gmail.com wrote: > On Fri, Nov 27, 2009 at 12:57 PM, Skipper Seabold wrote: >> This kind of info might be useful to other newcomers >> somewhere... ? Thoughts on >> posting this on the wiki here? > > I also agree. It will improve with the newl

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

2009-11-27 Thread Ralf Gommers
On Fri, Nov 27, 2009 at 7:15 PM, wrote: > > Well put, Chris. It took me a long time get my head around these > > distinctions, and then only when others pointed out my errors in > > understanding. This kind of info might be useful to other newcomers > > somewhere...

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

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 12:57 PM, Skipper Seabold wrote: > On Fri, Nov 27, 2009 at 12:41 PM, Christopher Barker > wrote: >> Wayne Watson wrote: >>> Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and >>> SciPy. They all have seemed part of one another, but I think I see how >>

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

2009-11-27 Thread Skipper Seabold
On Fri, Nov 27, 2009 at 12:41 PM, Christopher Barker wrote: > Wayne Watson wrote: >> Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and >> SciPy. They all have seemed part of one another, but I think I see how >> they've divided up the game. > > For the record: > > I know this

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

2009-11-27 Thread Christopher Barker
Wayne Watson wrote: > Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and > SciPy. They all have seemed part of one another, but I think I see how > they've divided up the game. For the record: I know this is a bit confusing, particularly for someone used to an integrated

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

2009-11-27 Thread Skipper Seabold
On Fri, Nov 27, 2009 at 12:14 PM, Wayne Watson wrote: > It's good to have some extra references for NumPy. > > Actually, it looks like exercising histogram in NunPy has gotten me past > the difficulties with hist in matplotlib. I Is there a matplotlib or > Pylab mailing list. It uses hist and look

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

2009-11-27 Thread Wayne Watson
It's good to have some extra references for NumPy. Actually, it looks like exercising histogram in NunPy has gotten me past the difficulties with hist in matplotlib. I Is there a matplotlib or Pylab mailing list. It uses hist and looks very much like histogram, but has some parameters that I ne

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

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 8:43 AM, Wayne Watson wrote: > Thanks. That sounds like it should help a lot. Finding meaningful > examples anywhere hasn't been easy. I thought I'd look through Amazon > for books on Python and scientific uses. I found almost all were written > by authors outside the US, a

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

2009-11-27 Thread Wayne Watson
Thanks. That sounds like it should help a lot. Finding meaningful examples anywhere hasn't been easy. I thought I'd look through Amazon for books on Python and scientific uses. I found almost all were written by authors outside the US, and none seemed to talk about items like matplotlib. Ezdraw

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

2009-11-27 Thread Vincent Schut
Wayne Watson wrote: > I have a list that already has the frequencies from 0 to 255. However, > I'd like to make a histogram that has say 32 bins whose ranges are 0-7, > 8-15, ... 248-255. Is it possible? > Wayne, you might find the 'numpy example list with doc' webpage quite informative... ht

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

2009-11-26 Thread josef . pktd
On Fri, Nov 27, 2009 at 12:16 AM, Wayne Watson wrote: > I have a list that already has the frequencies from 0 to 255. However, > I'd like to make a histogram  that has say 32 bins whose ranges are 0-7, > 8-15, ... 248-255. Is it possible? If they have equal sized (width) bins, then you should be

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

2009-11-26 Thread Wayne Watson
I have a list that already has the frequencies from 0 to 255. However, I'd like to make a histogram that has say 32 bins whose ranges are 0-7, 8-15, ... 248-255. Is it possible? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N)