desc.plotting.plot_boundaries
- desc.plotting.plot_boundaries(eqs, labels=None, phi=None, ax=None, return_data=False, **kwargs)[source]
Plot stellarator boundaries at multiple toroidal coordinates.
- Parameters:
eqs (array-like of Equilibrium or EquilibriaFamily) – Equilibria to plot.
labels (array-like) – Array the same length as eqs of labels to apply to each equilibrium.
phi (int or array-like or None) – Values of phi to plot boundary surface at. If an integer, plot that many contours linearly spaced in [0,2pi). Default is 1 contour for axisymmetric equilibria or 4 for non-axisymmetry.
ax (matplotlib AxesSubplot, optional) – Axis to plot on.
return_data (bool) – if True, return the data plotted as well as fig,ax
**kwargs (dict, optional) –
Specify properties of the figure, axis, and plot appearance e.g.:
plot_X(figsize=(4,6),label="your_label")
Valid keyword arguments are:
figsize
: tuple of length 2, the size of the figure (to be passed to matplotlib)cmap
: colormap to use for plotting, discretized into len(eqs) colorscolors
: array of colors to use for each Equilibriumls
: array of line styles to use for each Equilibriumlw
: array of line widths to use for each Equilibriumlabel_fontsize
: float, fontsize of the x and y labelslegend_fontsize
: float, fontsize of the legend
- Returns:
fig (matplotlib.figure.Figure) – Figure being plotted to.
ax (matplotlib.axes.Axes or ndarray of Axes) – Axes being plotted to.
plot_data (dict) – dictionary of the data plotted, only returned if
return_data=True
Examples
from desc.plotting import plot_boundaries fig, ax = plot_boundaries((eq1, eq2, eq3))