Thanks, this works well. My current result can be seen at . The x
data is real numbers, while the y data is integers; so I set the
number of y-bins to the range of the y data.
What I'd like to do now is scale the plot such that for every y value
the sum of the intensities are equal. Let count[j] be the number of
data points having y value equal to j, and let product be the product
of all non-zero count[j]. One possible solution would be to put in
each data point (product / count[j]) times, but since product is far
too large this won't work (even the lcm is too huge). Is there a
better solution to do this using matplotlib?
On Wed, Apr 29, 2009 at 5:29 PM, John Hunter <jdh2358@...287...> wrote:
On Wed, Apr 29, 2009 at 9:59 AM, marcog <marco@...2585...> wrote:
I have a set of 2 dimensional data that I would like to form a histogram
Each data point is defined by an x and y variable. So essentially what I
would like to obtain is a "row" of histograms as produced by the plot.hist
function, stacking them next to one another in a single 3D plot. For
example, something like , but I don't need it to be interpolated.
hexbin may be what you are looking for, which does a 2D colormapped
histogram, with an optional reduce function so you can specify the intensity
function over the bins
MSc Student | SACO Scientific Committee | ACM ICPC Coach
Department of Computer Science, University of Cape Town
people.cs.uct.ac.za/~mgallott | marco-za.blogspot.com
marco AT gallotta DOT co DOT za | 073 170 4444 | 021 552 2731