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

Skipper Seabold jsseabold@gmail....
Thu Jan 31 08:17:13 CST 2013


On Thu, Jan 31, 2013 at 9:01 AM, Frank Breitling <fbreitling@aip.de> wrote:

> 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.
>

This may be a discussion for matplotlib-user, but have you had a look at
trying to use broken_barh for your needs?

http://matplotlib.org/examples/pylab_examples/broken_barh.html

Skipper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20130131/fa758453/attachment.html 


More information about the SciPy-Dev mailing list