nside = healpy.get_nside(hpxmap.data)
ipring,=np.where(hpxmap.data > healpy.UNSEEN)
thetaMap,phiMap = healpy.pix2ang(nside, ipring)
lonMap = np.degrees(phiMap)
latMap = 90.0-np.degrees(thetaMap)
hi,=np.where(lonMap > 180.0) # FIXME
lonMap[hi] -= 360.0
lon = np.linspace(lonMap.min(), lonMap.max(), xsize)
lat = np.linspace(latMap.min(), latMap.max(), xsize)
lon, lat = np.meshgrid(lon, lat)
@erykoff suggests an improvement to the map sampling scheme.