I'm working with a Python program that produces freq below. There are 32
bins. The bins represent 0-7, 8-14, ..., 248 - 255 of a set of
frequencies (integer counts). 0 to 255 are the brightness pixel values
from a 640x480 frame of b/w pixels. I binned 8 into each of 32 bins. One
can easily see that the various bins are of a different height. However,
the result is fixed height bar from 0 to 10, and a shorter single bar
from about 120 to 130. The x-scale goes from 0 to 140 and not from 0 to
255, or somewhere in that range. It seems like hist is clumping
everything into two groups. I've changed the range parameter several
times and get the same result. I'd send an attachment of the figure, but
that often seems to delay a post in most of these Python mail lists.
freq = [127516, 8548, 46797, 46648, 21085, 9084, 7466, 6534, 5801,
5051, 4655, 4168, 4343, 3105, 2508, 2082, 1200, 488, 121, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0]
fig = pylab.figure()
v = array(freq)
plt.hist(v, bins=linspace(0,256,nplt_bins+1), normed=1, range=(30,200))
pylab.show()
--
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
The popular press and many authorities believe the number
of pedifiles that prowl the web is 50,00. There are no
figures that support this. The number of children below
18 years of age kidnapped by strangers is 1 in 600,00,
or 115 per year. -- The Science of Fear by D. Gardner
Web Page: <www.speckledwithstars.net/>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users