desc.plotting.plot_boozer_surface

desc.plotting.plot_boozer_surface(eq, grid_compute=None, grid_plot=None, fill=False, ncontours=100, ax=None, return_data=False, **kwargs)[source]

Plot \(|B|\) on a surface vs the Boozer poloidal and toroidal angles.

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

  • grid_compute (Grid, optional) – grid to use for computing boozer spectrum

  • grid_plot (Grid, optional) – grid to plot on

  • fill (bool, optional) – Whether the contours are filled, i.e. whether to use contourf or contour.

  • ncontours (int, optional) – Number of contours to plot.

  • 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),cmap="plasma")
    

    Valid keyword arguments are:

    figsize: tuple of length 2, the size of the figure (to be passed to matplotlib) cmap: str, matplotib colormap scheme to use, passed to ax.contourf levels: int or array-like, passed to contourf 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

  • plot_data (dict) – dictionary of the data plotted only returned if return_data=True plot_data keys:

    |B|”: magnetic field magntitude on surface “theta_Boozer”,”zeta_Boozer”: Boozer poloidal, toroidal angles

    array of shape (num_theta, num_zeta)

Examples

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