[AstroPy] all-sky map

Eric Jensen ejensen1 at swarthmore.edu
Tue Apr 5 14:55:04 EDT 2011

Hi Jonathan,

> I'm looking for a way to plot an all-sky map of modeled data using a
> Hammer-Aitoff projection.

You can do this using matplotlib.pyplot.subplot (http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.subplot 
  ) by passing "projection='aitoff' " :

subplot(212, projection='aitoff')

# Pass the coordinates in radians, since otherwise the
# aitoff projection messes up:

deg2rad = pi/180.
plot(l*deg2rad, b*deg2rad, 'g*')
text(0,-120*deg2rad,'Galactic longitude (degrees)',
      ha='center', va='center')
ylabel('Galactic latitude (degrees)')


P.S.  I'm not sure about subtleties of differences (if any) between  
Aitoff and Hammer-Aitoff, but presumably this is close to what you want.

More information about the AstroPy mailing list