desc.plotting.plot_coefficients

desc.plotting.plot_coefficients(eq, L=True, M=True, N=True, ax=None, **kwargs)[source]

Plot spectral coefficient magnitudes vs spectral mode number.

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

  • L (bool) – Whether to include radial mode numbers in the x-axis or not.

  • M (bool) – Whether to include poloidal mode numbers in the x-axis or not.

  • N (bool) – Whether to include toroidal mode numbers in the x-axis or not.

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

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

    Specify properties of the figure, axis, and plot appearance e.g.:

    plot_X(figsize=(4,6))
    

    Valid keyword arguments are:

    figsize: tuple of length 2, the size of the figure (to be passed to matplotlib) title_font_size: integer, font size of the title

Returns:

  • fig (matplotlib.figure.Figure) – Figure being plotted to.

  • ax (matplotlib.axes.Axes or ndarray of Axes) – Axes being plotted to.

Examples

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