xbout.plotting.plotfuncs.plot2d_polygon¶
- xbout.plotting.plotfuncs.plot2d_polygon(da, ax=None, cax=None, cmap='viridis', norm=None, logscale=False, antialias=False, vmin=None, vmax=None, extend='neither', add_colorbar=True, colorbar_label=None, separatrix=True, separatrix_kwargs={'color': 'white', 'linestyle': '-', 'linewidth': 2}, targets=False, add_limiter_hatching=False, grid_only=False, linewidth=0, linecolor='black')[source]¶
Nice looking 2D plots which have no visual artifacts around the X-point.
- Parameters:
da (
xarray.DataArray) – A 2D (x,y) DataArray of data to plotax (
Axes, optional) – Axes to plot on. If not provided, will make its own.cax (
Axes, optional) – Axes to plot colorbar on. If not provided, will plot on the same axes as the plot.cmap (
strormatplotlib.colors.Colormap, default"viridis") – Colormap to use for the plotnorm (
matplotlib.colors.Normalize, optional) – Normalization to use for the color scalelogscale (
bool, defaultFalse) – If True, use a symlog color scaleantialias (
bool, defaultFalse) – Enables antialiasing. Note: this also shows mesh cell edges - it’s unclear how to disable this.vmin (
float, optional) – Minimum value for the color scalevmax (
float, optional) – Maximum value for the color scaleextend (
str, optional, default"neither") – Extend the colorbar. Options are “neither”, “both”, “min”, “max”add_colorbar (
bool, defaultTrue) – Enable colorbar in figure?colorbar_label (
str, optional) – Label for the colorbarseparatrix (
bool, defaultTrue) – Add lines showing separatricesseparatrix_kwargs (
dict) – Keyword arguments to pass custom style to the separatrices plottargets (
bool, defaultTrue) – Draw solid lines at the target surfacesadd_limiter_hatching (
bool, defaultTrue) – Draw hatched areas at the targetsgrid_only (
bool, defaultFalse) – Only plot the grid, not the data. This sets all the polygons to have a white face.linewidth (
float, default0) – Width of the gridlines on cell edgeslinecolor (
str, default"black") – Color of the gridlines on cell edges