Inverted transform for Mollweide projection


I want to plot a scalar function on the sphere in a Mollweide projection. My strategy is to:
  1. Generate a rectangular mesh in display coordinates,
  2. Apply the inverse transform for the Mollweide projection to get the data coordinates of every display coordinate,
  3. Evaluate the function at each data coordinate, and finally,
  4. Plot with imshow.

I noticed that the inverse transform in matplotlib.projections.geo.MollweideAxes is not implemented. I'm attaching a patch that fills in the missing inverse.

Also attached is a minimal example of the type of plot I am interested in making.

Leo Singer
Graduate Student @ LIGO-Caltech

0001-Defined-the-inverse-transform-for-Mollweide-projecti.patch (1.18 KB) (1000 Bytes)