Plotting Hex grid

I am aware of Hexbin, which is a kind of histogram with hexagonal
cells. But what if my data comes in a Hex grid to start with?

I have a 2-D array probe with sensor elements arranged in a hexagonal
close packed geometry, plotting the sensor readings in normal x-y
(rectangular grid) directly will distort every other line of the
element spacing.

What would be a good way to plot such data?

Thanks!

iCy-fLaME wrote:

I am aware of Hexbin, which is a kind of histogram with hexagonal
cells. But what if my data comes in a Hex grid to start with?

What would be a good way to plot such data?

Use the source, Luke!

Take a look at the source of Hexbin -- the answer must be there.

With luck, it's been factored in a way that you can use the drawing code without the binning code.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

You will probably want to create a PolyCollection or a RegularPolyCollection:

http://matplotlib.sourceforge.net/search.html?q=PolyCollection

Examples at: http://matplotlib.sourceforge.net/examples/api/collections_demo.html?highlight=polycollection

JDH

···

On Thu, Dec 17, 2009 at 10:56 AM, Christopher Barker <Chris.Barker@...259...> wrote:

iCy-fLaME wrote:

I am aware of Hexbin, which is a kind of histogram with hexagonal
cells. But what if my data comes in a Hex grid to start with?

What would be a good way to plot such data?

Use the source, Luke!

Take a look at the source of Hexbin -- the answer must be there.