Plotting

There are a number of functions for plotting data from an Equilibrium or other DESC object in the desc.plotting module. All functions apart from 3-D methods are based on Matplotlib, and can plot to specified matplotlib.axes.Axes objects, or generate their own. plot_3d and plot_coils use the Plotly backend which can rotate/pan/zoom to see more detail.

1-D Line Plots

desc.plotting.plot_1d(eq, name[, grid, log, ...])

Plot 1D profiles.

desc.plotting.plot_fsa(eq, name[, ...])

Plot flux surface averages of quantities.

Plotting Flux Surfaces

desc.plotting.plot_surfaces(eq[, rho, ...])

Plot flux surfaces.

desc.plotting.plot_comparison(eqs[, rho, ...])

Plot comparison between flux surfaces of multiple equilibria.

desc.plotting.plot_boundary(eq[, phi, ...])

Plot stellarator boundary at multiple toroidal coordinates.

desc.plotting.plot_boundaries(eqs[, labels, ...])

Plot stellarator boundaries at multiple toroidal coordinates.

Contour Plots of 2-D data

desc.plotting.plot_2d(eq, name[, grid, log, ...])

Plot 2D cross-sections.

desc.plotting.plot_section(eq, name[, grid, ...])

Plot Poincare sections.

3-D Plotting

desc.plotting.plot_3d(eq, name[, grid, log, ...])

Plot 3D surfaces.

desc.plotting.plot_coils(coils[, grid, fig, ...])

Create 3D plot of coil geometry.

Specialized Plots for QS Metrics

desc.plotting.plot_boozer_surface(thing[, ...])

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

desc.plotting.plot_boozer_modes(eq[, log, ...])

Plot Fourier harmonics of \(|B|\) in Boozer coordinates.

desc.plotting.plot_qs_error(eq[, log, fB, ...])

Plot quasi-symmetry errors f_B, f_C, and f_T as normalized flux functions.

Misc Plotting Utilities

desc.plotting.plot_coefficients(eq[, L, M, ...])

Plot spectral coefficient magnitudes vs spectral mode number.

desc.plotting.plot_basis(basis[, return_data])

Plot basis functions.

desc.plotting.plot_grid(grid[, return_data])

Plot the location of collocation nodes on the zeta=0 plane.

desc.plotting.plot_logo([save_path])

Plot the DESC logo.