Create polar geographic projection of 2D matrix

Hi There,

I was hoping to find a way of plotting a 2D wave with dimensions corresponding to northern hemisphere longitude/ latitude coordinates as a polar image, i.e. centered on the North Pole, looking down.

An example of what I am aiming to do is in the attached .pxp..I want to go from the Mercator plot in graph 0 to something like the polar image displayed in graph 1 (without the text and boxes).

Thanks in advance for any help you are able to give!
Merc2Polar.pxp
The complication here is that Igor's <New Polar Graphs> ipf does not seem to allow 2D images, only traces. Rather than struggle with a cumbersome patch, I think it is simpler to make your own polar graph and add your 2D data to it.
(1) for simplicity, extract latitude and longitude waves from W_geometries
(2) create polar coordinate waves wX = (90 - latitude)*cos(longitude*pi/180) and wY = (90-latitude)*sin(longitude*pi/180)
(3) display wY vs wX for a polar projection of the continent boundaries
(4) in your Procedure file, #include <MatrixToXYZ>, and convert into wavex, wavey, wavez: MatrixToXYZ("r2matrixPos_0","wave",2,2)
(5) as above, transform waveX and waveY into Polar-ized wxi and weta
(6) display weta vs wxi into a polar shaped "grid" and then set as f(z) the color from wavez.

I hope this helps. I suppose IP7 can do your requirement more simply, but I am stuck for now with IP 6.37

Further thoughts: Actually the modification to Polar graph is not bad, and avoids making your own transformation, if you use the same waveY vs waveX (colored by waveZ) strategy. Just remember that the radius coordinate is 90 - latitude (for polar origin at 0).
PolarGraph0.png
See http://www.igorexchange.com/node/6288

Quote:

The DisplayPolarImage macro accepts a 2-D matrix of radius and angle and creates an image plot from the data.

The method involves interpolating to a grid, using NaN to render the portion outside of the polar circle transparent.

This version adds two parameters to set the angle=0 location and whether angles increase clockwise or counter-clockwise.


and http://www.igorexchange.com/node/6286#comment-10930
Quote:

There is another way to display the image by using the attached experiment which modifies the New Polar Graphs code by having these Override definitions in the main Procedure window (the Overrides cannot be moved elsewhere)...


--Jim Prouty
Software Engineer, WaveMetrics, Inc.