A small example code (that can swap with_extent True/False, and then zoom could be toggled True/False):
import numpy as np
import healpy as hp
import matplotlib.pyplot as plt
import skyproj
nside = 64
hpmap = np.arange(0, hp.nside2npix(nside), 1)
# mask some part of the sky for 'zoom' (otherwise zoom=True crashes)
ra, dec = hp.pix2ang(nside, hpmap, lonlat=True)
hpmap = hpmap.astype(float)
hpmap[np.where(dec > 60)] = hp.UNSEEN
with_extent = True
fig, ax = plt.subplots()
min_lat = np.degrees(np.arccos(np.finfo(float).resolution))
if with_extent:
sp = skyproj.LaeaSkyproj(ax=ax, lon_0=0, lat_0=-min_lat, extent = [0, 360, -min_lat, 85])
else:
sp = skyproj.LaeaSkyproj(ax=ax, lon_0=0, lat_0=-min_lat)
im, lon_raster, lat_raster, values_raster = sp.draw_hpxmap(hpmap, zoom=False)
This is with skyproj 2.0.3.