[SciPy-Dev] 2D histogram: request for plotting variable bin size

Frank Breitling fbreitling@aip...
Thu Jan 31 08:01:49 CST 2013


Hello,

http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram2d.html

explains the usage of 2D histograms.
Although it is possible to construct 2D histograms with a variable bin
size, there is no simple way to plot them.
Therefore I would like to request an implementation to imshow that
allows the visualization of 2D histograms with variable bin size. I
imagine a syntax like

imshow(historgram2d, xedges=xedges, yedges=yedges)

where xedges and yedges are the bin edges along the x- and y-axis.

I have attached a short program and its output which constructs a
numpy.historgram2d with variable bin width (xedges=[0,1,3]) and shows
its bin content with imshow.
I would highly appreciate if imshow would be extended to represent the
histogram correctly.
If there is an alternative solution, I would be interested to learn
about it as well.

Kind regards

Frank

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hist2d.py
Type: text/x-python
Size: 329 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-dev/attachments/20130131/214550a3/attachment-0001.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hist2d.png
Type: image/png
Size: 17161 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-dev/attachments/20130131/214550a3/attachment-0001.png 


More information about the SciPy-Dev mailing list