routines

Note

The routines in this module are either documented elsewhere (by the class that inherits them) or they are lower-level tools that are only documented here for the developers.

Advanced pre- and postprocessing routines.

Module for generating common plots with ASCOT5.

This module should be imported everywhere where plotting is done instead of using matplotlib directly. The reason is that on some platforms matplotlib is not available and even there we want to able to use all functionality that doesn’t require plotting.

So either import this module or use try-except when importing matplotlib.

a5py.routines.plotting.add_highlighted_edges(plotter, wallmesh_highlight, color='yellow', line_width=3)

Highlight the edges of a wall mesh on an existing PyVista plotter.

Parameters:
plotterpv.Plotter

The PyVista plotter instance where the mesh is already displayed.

wallmesh_highlightpv.PolyData

The wall mesh whose edges you want to highlight.

colorstr, optional

Color of the edges (default “yellow”).

line_widthint, optional

Thickness of the edge lines (default 3).

a5py.routines.plotting.add_phi_lines(wallmesh, plotter, phi_lines, a5)

Add phi lines to a PyVista plotter.

Parameters:
wallmeshpv.PolyData

The wall mesh to which the phi lines will be added.

plotterpv.Plotter

The PyVista plotter instance where the mesh is already displayed.

phi_linesnp.ndarray

Array of phi values.

a5a5py.ASCOT

An instance of the ASCOT class.

a5py.routines.plotting.add_phi_planes(wallmesh, plotter, phi_planes)

Add phi planes to a PyVista plotter.

Parameters:
wallmeshpv.PolyData

The wall mesh to which the phi planes will be added.

plotterpv.Plotter

The PyVista plotter instance where the mesh is already displayed.

phi_planesnp.ndarray

Array of phi values.

a5py.routines.plotting.add_theta_lines(plotter, phi_array, theta_lines, a5, rminor_wall)

Add theta lines to a PyVista plotter.

Parameters:
plotterpv.Plotter

The PyVista plotter instance where the mesh is already displayed.

phi_arraynp.ndarray

Array of phi values.

theta_linesnp.ndarray

Array of theta values.

a5a5py.ASCOT

An instance of the ASCOT class.

rminor_wallfloat

Minor radius of the wall. Used to determine the theta label positions.

a5py.routines.plotting.arrows2d()

Plot vector field on 2D plane.

a5py.routines.plotting.cameracontrols(plotter)

Set FPS camera controls vor interactive plotting.

Parameters:
plotterPlotter

The active plotter.

a5py.routines.plotting.contour2d(x, y, z, contours=None, xlabel=None, ylabel=None, axesequal=False, colors=None, linestyles=None, linewidths=None, axes=None, contourlabels=False, labelfontsize=10)

Plot contour on 2D plane.

a5py.routines.plotting.defaultcamera(wallmesh)

Get default camera (helper function for the 3D plots).

Default camera is located at R = (Rmax + Rmin) / 2, phi = 0 deg, z = (zmax, zmin) / 2, where the min/max values are taken from the bounding box of the wall mesh. The focal point is at same (R, z) coordinates but phi = 10 deg. The camera angle parameters are all set to zero.

Parameters:
wallmeshPolydata

The wall mesh.

Returns:
cposarray_like

Camera position coordinates [x, y, z].

cfocarray_like

Camera focal point coordinates [x, y, z].

cangarray_like

Camera angle [azimuth, elevation, roll].

a5py.routines.plotting.figuredoublecolumn(aspectratio=1.5)

Return figure that has a size suitable for printing in A4 double-column width (when the paper has a double-column format).

a5py.routines.plotting.figuresinglecolumn(aspectratio=1.5)

Return figure that has a size suitable for printing in A4 single-column width (when the paper has a double-column format).

Parameters:
aspectratiofloat

Width / height ratio of the returned figure.

Returns:
a5py.routines.plotting.getmathtextsciformatter(format)

Returns a label tick formatter that shows numbers in format “a x 10^b”.

Credit: https://stackoverflow.com/a/49330649

Examples

>>> plt.gca().yaxis.set_major_formatter(getmathtextsciformatter("%1.2e"))
a5py.routines.plotting.hist1d(x, xbins=None, weights=None, xlog='linear', logscale=False, xlabel=None, ylabel=None, title=None, legend=None, axes=None, skipshow=False, histtype='bar')

Plot (stacked) marker histogram in 1D.

Parameters:
xarray_like or list [array_like]

Array or a list of arrays to be binned and plotted.

If list is given, the resulting histogram is stacked with each array in the list corresponding to one layer in the stacked histogram.

xbinsint or array_like, optional

Number of bins or array storing bin edges for the x coordinate.

weightsarray_like or list [array_like], optional

Values the datapoints are weighted with.

Same format as for x.

xlog{“linear”, “log”}, optional

x-axis scaling.

logscalebool, optional

Show histogram in logarithmic scale.

xlabelstr, optional

Label for the x-axis.

legendstr, array_like

List of strings to label the data with.

The length of the list must be same as the number of data arrays provided.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

a5py.routines.plotting.hist2d(x, y, xbins=None, ybins=None, weights=None, xlog='linear', ylog='linear', logscale=False, xlabel=None, ylabel=None, axesequal=False, axes=None, cax=None)

Plot marker histogram in 2D.

Parameters:
xarray_like, (n,)

x-coordinates of the data to be binned and plotted.

yarray_like, (n,)

y-coordinates of the data to be binned and plotted.

xbinsint or array_like, optional

Number of bins or array storing bin edges for the x coordinate.

ybinsint or array_like, optional

Number of bins or array storing bin edges for the y coordinate.

weightsarray_like, (n,), optional

Values the datapoints are weighted with.

If weights are included, the colorbar label changes from “Markers” to “Particles”.

xlog{“linear”, “log”}, optional

x-axis scaling.

ylog{“linear”, “log”}, optional

y-axis scaling.

logscalebool, optional

Show histogram in logarithmic scale.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

axesequalbool, optional

Flag to set the aspect ratio equal.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

a5py.routines.plotting.interactive(wallmesh, *args, points=None, orbit=None, data=None, log=False, clim=None, cmap=None, cbar_title=None, cpos=None, cfoc=None, cang=None, p=None, phi_lines=None, const_phi_planes=None, theta_lines=None, a5=None, skipshow=False, **kwargs)

Open VTK window to display interactive view of the wall mesh.

Parameters:
wallmeshPolydata

Mesh representing the wall.

*argstuple (str, method), optional

Key (str) method pairs. When key is pressed when the plot is displayed, the associated method is called. The method should take Plotter instance as an argument.

pointsarray_like, optional

Array Npoint x 3 defining points (markers) to be shown. For each point [x, y, z] coordinates are given.

orbitarray_like, (n,3), optional

Cartesian coordinates for an orbit to be plotted.

datastr, optional

Name of the cell data in the wall mesh that is shown in color.

logbool, optional

Color range is logarithmic if True.

clim[float, float], optional

Color [min, max] limits.

cmapstr, optional

Colormap name.

cbar_titlestr, optional

Color bar title.

cposarray_like, optional

Camera position coordinates [x, y, z].

cfocarray_like, optional

Camera focal point coordinates [x, y, z].

cangarray_like, optional

Camera angle [azimuth, elevation, roll].

pPlotter, optional

PyVista plotter instance.

phi_linesarray_like, optional

Array of phi values in degrees.

const_phi_planesarray_like, optional

Array of phi values in degrees.

theta_linesarray_like, optional

Array of theta values in degrees.

a5a5py.ASCOT, optional

ASCOT instance.

skipshowbool, optional

If True, do not show the plot. Useful if you want to draw something else like a flux surface in the same Plotter.

**kwargs

Keyword arguments passed to Plotter.

a5py.routines.plotting.line2d(x, y, c=None, xlog='linear', ylog='linear', clog='linear', xlabel=None, ylabel=None, clabel=None, bbox=None, cmap=None, axesequal=False, axes=None, cax=None, marker=None, markerfacecolor=None, title=None, label=None, skipshow=False)

Plot line segments in 2D.

xarray_like

Marker x-coordinates.

yarray_like

Marker y-coordinates.

cstr or array_like, optional

Color data or string indicating the color.

xlog{“linear”, “log”, “symlog”}, optional

x-axis scaling.

ylog{“linear”, “log”, “symlog”}, optional

y-axis scaling.

clog{“linear”, “log”, “symlog”}, optional

color-axis scaling.

cmapstr, optional

Name of the colormap.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

clabelstr, optional

Label for the color axis.

axesequalbool, optional

Flag to set aspect ratio of [x,y] axes equal.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

markerstr, optional

Marker type.

markerfacecolorstr, optional

Color of the marker face.

titlestr, optional

Title of the figure.

labelstr, optional

Label for the legend.

skipshowbool, optional

Flag to skip the show function. Only used by the openfigureifnoaxes decorator.

a5py.routines.plotting.line3d(x, y, z, c=None, xlog='linear', ylog='linear', zlog='linear', clog='linear', xlabel=None, ylabel=None, zlabel=None, clabel=None, bbox=None, cmap=None, axesequal=False, axes=None, cax=None)

Plot line segments in 3D.

Parameters:
xarray_like

Marker x-coordinates.

yarray_like

Marker y-coordinates.

zarray_like

Marker z-coordinates.

cstr or array_like, optional

Color data or string indicating the color.

xlog{“linear”, “log”, “symlog”}, optional

x-axis scaling.

ylog{“linear”, “log”, “symlog”}, optional

y-axis scaling.

zlog{“linear”, “log”, “symlog”}, optional

z-axis scaling.

clog{“linear”, “log”, “symlog”}, optional

color-axis scaling.

cmapstr, optional

Name of the colormap.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

zlabelstr, optional

Label for the z-axis.

clabelstr, optional

Label for the color axis.

axesequalbool, optional

Flag to set aspect ratio of [x,y,z] axes equal.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

a5py.routines.plotting.loadvsarea(wetted, loads, axes=None)

Plot histogram showing minimum load vs area.

a5py.routines.plotting.mesh1d(x, y, xlabel=None, ylabel=None, axes=None, logscale=False, label=None)

Plot 1D distribution.

Parameters:
xarray_like (nx,)

Abscissa edges for the x-axis.

yarray_like (nx-1,)

Data to be plotted.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

logscale: bool, optional

Whether the plot is in logarithmic scale.

labelstr, optional

Label if you are using a legend.

a5py.routines.plotting.mesh2d(x, y, z, logscale=False, diverging=False, xlabel=None, ylabel=None, clabel=None, clim=None, cmap=None, axesequal=False, axes=None, cax=None)

Make a mesh (surface) plot in 2D.

Parameters:
xarray_like (nx,) or (nx+1,)

Abscissa or abscissa edges for the x-axis.

yarray_like (ny,) or (ny+1,)

Abscissa or abscissa edges for the y-axis.

zarray_like (nx,ny)

Data to be plotted.

logscalebool, optional

Make color axis logarithmic.

divergingbool, optional

Use diverging colormapping which is centered at zero.

Works with logarithmic scale as well.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

clabelstr, optional

Label for the color-axis.

clim[float, float], optional

Color [min, max] limits.

cmapstr, optional

Colormap.

axesequalbool, optional

Flag to set the aspect ratio equal.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

a5py.routines.plotting.momentumpolargrid(pnorm_edges, pitch_edges, axes=None)

Plot momentum space polar coordinate grid in Cartesian basis.

Parameters:
pnorm_edgesarray_like

Momentum abscissa edges.

pitch_edgesarray_like

Pitch abscissa edges.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

a5py.routines.plotting.momentumpolarplot(pnorm_edges, pitch_edges, dist, axes=None, cax=None)

Plot momentum space distribution in polar coordinates.

Parameters:
pnorm_edgesarray_like

Momentum abscissa edges.

pitch_edgesarray_like

Pitch abscissa edges.

distarray_like

Values of the distribution.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

a5py.routines.plotting.openfigureifnoaxes(projection='rectilinear')

Decorator for creating and displaying a new figure if axes are not provided.

Parameters:
projectionstr, {None, ‘3d’, ‘aitoff’, ‘hammer’, ‘lambert’, ‘mollweide’,
‘polar’, ‘rectilinear’}, optional

The axes projection type, see Matplotlib documentation for details.

a5py.routines.plotting.poincare(x, y, ids, connlen=None, xlim=None, ylim=None, xlabel=None, ylabel=None, clabel=None, axesequal=False, markersize=2, axes=None, cax=None)

Poincaré plot where color separates markers or shows the connection length.

For better performance this function uses matplotlib’s plot function instead of the scatter function. The only practical difference is that the marker color can’t be continuous.

Parameters:
xarray_like

Orbit x-coordinates.

yarray_like

Orbit y-coordinates.

idsarray_like

Array of marker IDs showing to which marker the points in x and y arrays correspond to.

connlenarray_like, optional

Connection length at the position (x,y).

Negative if the marker is confined. If given, the color scale shows connection length instead of marker ID. The confined markers are still shown with shades of red.

xlimtuple(float, float), optional

Min and max values for the x-axis.

ylimtuple(float, float), optional

Min and max values for the y-axis.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

clabelstr, optional

Label for the color axis.

axesequalbool, optional

If True, x and y axis have equal aspect ratio.

markersizeint, optional

Marker size on plot.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

a5py.routines.plotting.radialprofile(x, y1, y2=None, xlim=None, y1lim=None, y2lim=None, xlabel=None, y1label=None, y2label=None, y1legends=None, y2legends=None, axes=None, tightlayout=True, title=None)

Plot 1D profiles on axes that can have two y-axes and the y-axis combines both linear and logarithmic scale.

Parameters:
xarray_like, (n,)

The x grid where y1 (and y2) values are provided.

y1array_like or [array_like]

The values (or a list of values in which case they are separated by colour) plotted on the left y-axis.

y2array_like or [array_like], optional

The values (or a list of values) plotted on the right y-axis.

xlim[float, float], optional

Limits on x-axis.

y1lim[float, float, float], optional

Limits on the first y axis where the middle value is when the scale changes from logarithmic to linear.

y2lim[float, float, float], optional

Limits on the second y axis where the middle value is when the scale changes from logarithmic to linear.

xlabelstr, optional

Label on the x-axis.

y1labelstr, optional

Label on the first y-axis.

y2labelstr, optional

Label on the second y-axis.

y1legends: [str], optional

Legends for the values plotted on the first y-axis.

Number of legend values must be the same as the number of y1.

y2legends: [str], optional

Legends for the values plotted on the second y-axis.

Number of legend values must be the same as the number of y2.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

tightlayoutbool, optional

Whether to use tight layout.

titlestr, optional

Title of the figure.

a5py.routines.plotting.radialprofile_single_scale_axes(x, y1, y2=None, xlim=None, y1lim=None, y2lim=None, xlabel=None, y1label=None, y2label=None, y1legends=None, y2legends=None, axes=None, tightlayout=True, yscale='linear')

Plot 1D profiles in the same figure with two axes. Each y-axis has only linear or logarithmic scale. For contrast, see: radialprofile()

Parameters:
xarray_like

Marker x-coordinates.

y1array_like

Data to be plotted.

y2array_like, optional

Data to be plotted.

xlimarray_like, optional

x-axis limits.

y1limarray_like, optional

y1-axis limits.

y2limarray_like, optional

y2-axis limits.

xlabelstr, optional

Label for the x-axis.

y1labelstr, optional

Label for the y1-axis.

y2labelstr, optional

Label for the y2-axis.

y1legendslist of str, optional

Legends for the y1-axis.

y2legendslist of str, optional

Legends for the y2-axis.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

tightlayoutbool, optional

If True, adjust the subplot parameters to provide certain padding.

yscalestr, optional

Either “linear” or “log”.

a5py.routines.plotting.scatter2d(x, y, c=None, xlog='linear', ylog='linear', clog='linear', xlabel=None, ylabel=None, clabel=None, cint=9, cmap=None, axesequal=False, axes=None, cax=None, marker='o', markersize=6.0, markerfacecolor=None, alpha=1.0, title=None, label=None, skipshow=False)

Make a scatter plot in 2D+1 where color can be one dimension.

For better performance this function uses matplotlib’s plot function instead of the scatter function. The only practical difference is that the marker size can’t vary and the color can’t be continuous.

Parameters:
xarray_like

Marker x-coordinates.

yarray_like

Marker y-coordinates.

cstr or array_like, optional

Color data or string indicating the color.

xlog{“linear”, “log”, “symlog”}, optional

x-axis scaling.

ylog{“linear”, “log”, “symlog”}, optional

y-axis scaling.

clog{“linear”, “log”, “symlog”}, optional

color-axis scaling.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

clabelstr, optional

Label for the color axis.

cintint, optional

Number of colors used if c contains data. Since we are using plot instead of data, the color scale can’t be continuous.

cmapstr, optional

Name of the colormap where nc colors are picked if c contains data.

axesequalbool, optional

Flag to set aspect ratio of [x,y] axes equal.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

markersizefloat, optional

size of the drawn markers

markerfacecolorstr, optional

color with which the drawn markers are filled

alphafloat, optional

Transparency (0: transparent, 1:opaque)

titlestr, optional

title for the axes

labelstr, optional

label for the legend

skipshowbool, optional

Skip plt.show() if True. Only used by the decorator when no axes given.

a5py.routines.plotting.scatter3d(x, y, z, c=None, xlog='linear', ylog='linear', zlog='linear', clog='linear', xlabel=None, ylabel=None, zlabel=None, clabel=None, cint=None, cmap=None, axesequal=False, axes=None, cax=None, markersize=6.0, alpha=1.0, title=None)

Make a scatter plot in 3D+1 where color can be one dimension.

For better performance this function uses matplotlib’s plot function instead of the scatter function. The only practical difference is that the marker size can’t vary and the color can’t be continuous.

Parameters:
xarray_like

Marker x-coordinates.

yarray_like

Marker y-coordinates.

zarray_like

Marker z-coordinates.

cstr or array_like, optional

Color data or string indicating the color.

xlog{“linear”, “log”, “symlog”}, optional

x-axis scaling.

ylog{“linear”, “log”, “symlog”}, optional

y-axis scaling.

zlog{“linear”, “log”, “symlog”}, optional

z-axis scaling.

clog{“linear”, “log”, “symlog”}, optional

color-axis scaling.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

zlabelstr, optional

Label for the z-axis.

clabelstr, optional

Label for the color axis.

cintint, optional

Number of colors used if c contains data. Since we are using plot instead of data, the color scale can’t be continuous.

cmapstr, optional

Name of the colormap where nc colors are picked if c contains data.

axesequalbool, optional

Flag to set aspect ratio of [x,y] axes equal.

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

markersize: float, optional

Sets the size of the markers. Bigger number, bigger marker.

alphafloat, optional

Transparency (0: transparent, 1:opaque)

titlestr, optional

title for the axes

a5py.routines.plotting.setguistyle(latex=True)

Set default figure settings (label sizes etc.) so that the figure is suitable for GUI and presentations (large labels).

This function modifies the matplotlib style settings so one call is changes the style for the entire session.

Parameters:
latexbool, optional

Use LaTex interpreter.

a5py.routines.plotting.setpaperstyle(latex=True)

Set default figure settings (label sizes etc.) so that the figure is suitable for publications (looks nice on A4).

This function modifies the matplotlib style settings so one call is changes the style for the entire session.

Parameters:
latexbool, optional

Use LaTex interpreter.

a5py.routines.plotting.still(wallmesh, points=None, orbit=None, data=None, log=False, clim=None, cpos=None, cfoc=None, cang=None, axes=None, cax=None, **kwargs)

Take a still shot of the mesh and display it using matplotlib backend.

The rendering is done using vtk but the vtk (interactive) window is not displayed. It is recommended to use the interactive plot to find desired camera position and produce the actual plot using this method. The plot is shown using imshow and acts as a regular matplotlib plot.

Parameters:
wallmeshPolydata

Mesh representing the wall.

pointsarray_like, optional

Array Npoint x 3 defining points (markers) to be shown. For each point [x, y, z] coordinates are given.

orbitarray_like, (n,3), optional

Cartesian coordinates for an orbit to be plotted.

datastr, optional

Name of the cell data in the wall mesh that is shown in color.

logbool, optional

Color range is logarithmic if True.

clim[float, float], optional

Color [min, max] limits.

cposarray_like, optional

Camera position coordinates [x, y, z].

cfocarray_like, optional

Camera focal point coordinates [x, y, z].

cangarray_like, optional

Camera angle [azimuth, elevation, roll].

axesAxes, optional

The axes where figure is plotted or otherwise new figure is created.

caxAxes, optional

The color bar axes or otherwise taken from the main axes.

**kwargs

Keyword arguments passed to Plotter.

a5py.routines.plotting.surface3d(x_grid1d, y_grid1d, z_grid1d, qnt_grid1d=None, diverging=False, logscale=False, axesequal=False, xlabel=None, ylabel=None, zlabel=None, clabel=None, clim=None, cmap=None, axes=None, cax=None, meshalpha=0.6, tri_lc='gray', tri_lw=0.3, opacity=0.8, surfacecolor='purple')

Make a 3D surface plot from 1D coordinate arrays and optional quantity values.

You may encounter “WARNING:root:Singular matrix. Likely caused by all points lying in an N-1 space.” or two but, as the name suggests, it is just a warning.

Parameters:
x_grid1darray_like (n,)

X-coordinates of the surface points.

y_grid1darray_like (n,)

Y-coordinates of the surface points.

z_grid1darray_like (n,)

Z-coordinates of the surface points.

qnt_grid1darray_like (n,), optional

Quantity values associated with each point, used for coloring the surface.

divergingbool, optional

Use a diverging colormap centered at zero.

logscalebool, optional

Apply logarithmic scaling to the colormap.

axesequalbool, optional

Set 3D axes to have equal scaling.

xlabelstr, optional

Label for the x-axis.

ylabelstr, optional

Label for the y-axis.

zlabelstr, optional

Label for the z-axis.

clabelstr, optional

Label for the colorbar.

clim[float, float], optional

Limits for the colormap [min, max].

cmapstr or Colormap, optional

The colormap to use for surface coloring.

axesAxes3D, optional

The 3D axes to plot on, or None to create a new figure and axes.

caxAxes, optional

Axes to draw the colorbar on, or None to place it next to the main axes.

meshalphafloat, optional

A parameter used when generating the triangles (google: alpha shape).

tri_lcstr or color, optional

Color of triangle edges.

tri_lwfloat, optional

Line width of triangle edges.

opacityfloat, optional

Overall opacity of the surface (0: transparent, 1: opaque).

surfacecolorstr, optional

If no qnt is given, this color is used. By default purple because magneticfield itself is purple, everyone knows that.

a5py.routines.plotting.triangularpatch(patches, color, log=False, xlim=None, ylim=None, clim=None, xlabel=None, ylabel=None, clabel=None, cmap=None, axes=None, cax=None)

Plot triangular patches.