## [Matplotlib-users] Equal area projection

 [Matplotlib-users] Equal area projection From: Angus McMorland - 2009-07-27 22:23:21 ```Hi all, I've recently implemented a simple equal area (Lambert) projection in mpl, using two polar Axes (to draw each hemisphere), and this currently works fine to draw lines and points, since I'm transforming the points in my own code, from 3d-polar to 2d-projected-polar co-ordinates, and then plotting those. Now I have a need to also be able to draw coloured intensity maps on the Axes using the same transform, and I'm wondering what the best way to go about this would be. When I started the first implementation, I looked at basemap and its transforms, but they didn't seem to do what I wanted any more easily than just implementing it myself. I'm also vaguely aware of some transformation capabilities (that are relatively new?) in mpl itself, but I'm not sure whether they're useful to me for polar co-ordinate systems and plot contents, rather than plot decorations. Ideally, the transform would apply to the interpolation too, but I think it would be sufficient to linearly interpolate between the points: I can simply provide them at high enough density to minimize the discrepancy. Any suggestions on the best way to do this would be gratefully received. Thanks, Angus. -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh ```

 [Matplotlib-users] Equal area projection From: Angus McMorland - 2009-07-27 22:23:21 ```Hi all, I've recently implemented a simple equal area (Lambert) projection in mpl, using two polar Axes (to draw each hemisphere), and this currently works fine to draw lines and points, since I'm transforming the points in my own code, from 3d-polar to 2d-projected-polar co-ordinates, and then plotting those. Now I have a need to also be able to draw coloured intensity maps on the Axes using the same transform, and I'm wondering what the best way to go about this would be. When I started the first implementation, I looked at basemap and its transforms, but they didn't seem to do what I wanted any more easily than just implementing it myself. I'm also vaguely aware of some transformation capabilities (that are relatively new?) in mpl itself, but I'm not sure whether they're useful to me for polar co-ordinate systems and plot contents, rather than plot decorations. Ideally, the transform would apply to the interpolation too, but I think it would be sufficient to linearly interpolate between the points: I can simply provide them at high enough density to minimize the discrepancy. Any suggestions on the best way to do this would be gratefully received. Thanks, Angus. -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh ```
 Re: [Matplotlib-users] Equal area projection From: Jeff Whitaker - 2009-07-27 23:02:46 ```Angus McMorland wrote: > Hi all, > > I've recently implemented a simple equal area (Lambert) projection in > mpl, using two polar Axes (to draw each hemisphere), and this > currently works fine to draw lines and points, since I'm transforming > the points in my own code, from 3d-polar to 2d-projected-polar > co-ordinates, and then plotting those. > > Now I have a need to also be able to draw coloured intensity maps on > the Axes using the same transform, and I'm wondering what the best way > to go about this would be. When I started the first implementation, I > looked at basemap and its transforms, but they didn't seem to do what > I wanted any more easily than just implementing it myself. Angus: I'm curious about how you came to this conclusion. It seems like this should be trivial in Basemap, in fact it's exactly what I designed it for. If you send me a sample of your data, I can give you a simple script to plot it with Basemap. -Jeff > I'm also > vaguely aware of some transformation capabilities (that are relatively > new?) in mpl itself, but I'm not sure whether they're useful to me for > polar co-ordinate systems and plot contents, rather than plot > decorations. Ideally, the transform would apply to the interpolation > too, but I think it would be sufficient to linearly interpolate > between the points: I can simply provide them at high enough density > to minimize the discrepancy. > > Any suggestions on the best way to do this would be gratefully received. > > Thanks, > > Angus. > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ```