desc.plotting.plot_boundary

desc.plotting.plot_boundary(eq, zeta=None, plot_axis=False, ax=None, return_data=False, **kwargs)[source]

Plot stellarator boundary at multiple toroidal coordinates.

Parameters:
  • eq (Equilibrium) – Object from which to plot.

  • zeta (int or array-like or None) – Values of zeta 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 or not to plot the magnetic axis locations. Default is False.

  • ax (matplotlib AxesSubplot, optional) – Axis to plot on.

  • return_data (bool) – if True, return the data plotted as well as fig,ax

  • **kwargs (fig,ax and plotting properties) –

    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(zeta) colors colors: array of colors to use for each zeta angle ls : array of line styles to use for each zeta angle lw : array of line widths to use for each zeta angle marker: str, marker style to use for the axis plotted points size: float, marker size to use for the axis plotted points label_fontsize: float, fontsize of the x and y labels legend_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 plot_data keys:

    ”R”,”Z” cylindrical coordinates of boundary

Examples

../../_images/plot_boundary.png
from desc.plotting import plot_boundary
fig, ax = plot_boundary(eq)