Hi,
I'm using matplotlib for my scientific analysis, and charmed by It's
function.
Because I often use another tools for data histograming,
I think it's convenient if matplotlib could plot already histogramed
data more efficiently.
For exmple, changing from
hist(x, bins=10, noplot=0, normed=0)
to
hist(x, bins=10, noplot=0, normed=0, weights=[], errors=[])
Calling
hist([0.5, 1.5, 1.7, 2.5], [0.0, 1.0, 3.0])
equals to
hist([0.5, 1.6, 2.5], [0.0, 1.0, 3.0], weights=[1.0, 2.0, 0.0])
or
hist([0.5, 1.6, 2.5], [0.0, 1.0, 3.0], weights=[1.0, 2.0, 0.0],
errors=[1.0, 1.414, 0.0])
(1) When "weights" argument is provided, "x" is assumed as a list of
weighted mean (or center) values of each bin and "weights" is assumed
as a list of (already histogramed) weights of each bin.
(2) When "errors" argument is omitted, it's default values are set to
the squares of weights.
(3) When "errors" argument is provided, it's values are used as a list
of one-sigma errors of each bin.
Thank you for reading.
Koji
|