healpy.newvisufunc.projview

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, 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, **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().

Warning

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.

Parameters
mapfloat, 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)

kwargskeywords

any additional keyword is passed to pcolormesh

graticulebool

add graticule

graticule_labelsbool

longitude and latitude labels

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

type of the plot

cb_orientation{‘horizontal’, ‘vertical’}

color bar orientation

xlabelstr

set x axis label

ylabelstr

set y axis label

longitude_grid_spacingfloat

set x axis grid spacing

latitude_grid_spacingfloat

set y axis grid spacing

override_plot_propertiesdict

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

titlestr

set title of the plot

lcolorstr

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”.

phi_conventionstring

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’.

custom_xtick_labelslist

override x-axis tick labels

custom_ytick_labelslist

override y-axis tick labels