desc.plotting.plot_boundary
- desc.plotting.plot_boundary(eq, phi=None, plot_axis=True, ax=None, return_data=False, **kwargs)Source
Plot stellarator boundary at multiple toroidal coordinates.
- Parameters:
eq (Equilibrium, Surface) – Object from which to plot.
phi (float, 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.
plot_axis (bool) – Whether to plot the magnetic axis locations. Default is True.
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)xlabel_fontsize
: float, fontsize of the x labelylabel_fontsize
: float, fontsize of the y labellegend_kw
: dict, any keyword arguments to be passed to ax.legend()cmap
: colormap to use for plotting, discretized into len(phi) colorscolor
: array of colors to use for each phi anglels
: array of line styles to use for each phi anglelw
: array of line widths to use for each phi anglemarker
: str, marker style to use for the axis plotted pointssize
: float, marker size to use for the axis plotted points
- 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_boundary fig, ax = plot_boundary(eq)