healpy.newvisufunc.projview(m=None, rot=None, coord=None, unit='', xsize=1000, nest=False, min=None, max=None, flip='astro', format='%g', cbar=True, cmap='viridis', norm=None, graticule=False, graticule_labels=False, rot_graticule=False, override_rot_graticule_properties=None, return_only_data=False, projection_type='mollweide', cb_orientation='horizontal', xlabel=None, ylabel=None, longitude_grid_spacing=60, latitude_grid_spacing=30, override_plot_properties=None, title=None, xtick_label_color='black', ytick_label_color='black', graticule_color=None, fontsize=None, phi_convention='counterclockwise', custom_xtick_labels=None, custom_ytick_labels=None, invRot=True, **kwargs)

Plot a healpix map (given as an array) in the chosen projection.

See examples of using this function in the documentation under “Other tutorials”. Overplot points or lines using newprojplot().


this function is work in progress, the aim is to reimplement the healpy plot functions using the new features of matplotlib and remove most of the custom projection code. Please report bugs or submit feature requests via Github. The interface will change in future releases.

mfloat, array-like or None

An array containing the map, supports masked maps, see the ma function. If None, will display a blank map, useful for overplotting.

rotscalar or sequence, optional

Describe the rotation to apply. In the form (lon, lat, psi) (unit: degrees) : the point at longitude lon and latitude lat will be at the center. An additional rotation of angle psi around this direction is applied.

coordsequence of character, optional

Either one of ‘G’, ‘E’ or ‘C’ to describe the coordinate system of the map, or a sequence of 2 of these to rotate the map from the first to the second coordinate system.

unitstr, optional

A text describing the unit of the data. Default: ‘’

xsizeint, optional

The size of the image. Default: 800

nestbool, optional

If True, ordering scheme is NESTED. Default: False (RING)

minfloat, optional

The minimum range value

maxfloat, optional

The maximum range value

flip{‘astro’, ‘geo’}, optional

Defines the convention of projection : ‘astro’ (default, east towards left, west towards right) or ‘geo’ (east towards roght, west towards left) It creates the healpy_flip attribute on the Axes to save the convention in the figure.

formatstr, optional

The format of the scale label. Default: ‘%g’

cbarbool, optional

Display the colorbar. Default: True

norm{‘hist’, ‘log’, None}

Color normalization, hist= histogram equalized color mapping, log= logarithmic color mapping, default: None (linear color mapping)


any additional keyword is passed to pcolormesh


add graticule


longitude and latitude labels


rotate also the graticule when rotating the map


Override the following rotated graticule properties: “g_linestyle”, “g_linewidth”, “g_color”, “g_alpha”, “t_step”, “p_step”.

projection_type{‘aitoff’, ‘hammer’, ‘lambert’, ‘mollweide’, ‘cart’, ‘3d’, ‘polar’}

type of the plot

cb_orientation{‘horizontal’, ‘vertical’}

color bar orientation


set x axis label


set y axis label


set x axis grid spacing


set y axis grid spacing


Override the following plot properties: “cbar_shrink”, “cbar_pad”, “cbar_label_pad”, “figure_width”: width, “figure_size_ratio”: ratio.


set title of the plot


change the color of the longitude tick labels, some color maps make it hard to read black tick labels

fontsize: dict

Override fontsize of labels: “xlabel”, “ylabel”, “title”, “xtick_label”, “ytick_label”, “cbar_label”, “cbar_tick_label”.


convention on x-axis (phi), ‘counterclockwise’ (default), ‘clockwise’, ‘symmetrical’ (phi as it is truly given) if flip is “geo”, phi_convention should be set to ‘clockwise’.


override x-axis tick labels


override y-axis tick labels


invert rotation