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
|
Plot 1D profiles. |
|
Plot flux surface averages of quantities. |
Plotting Flux Surfaces
|
Plot flux surfaces. |
|
Plot comparison between flux surfaces of multiple equilibria. |
|
Plot stellarator boundary at multiple toroidal coordinates. |
|
Plot stellarator boundaries at multiple toroidal coordinates. |
|
Poincare plot of field lines from external magnetic field. |
Contour Plots of 2-D data
|
Plot 2D cross-sections. |
|
Plot Poincare sections. |
3-D Plotting
|
Plot 3D surfaces. |
|
Create 3D plot of coil geometry. |
|
Field line plot from external magnetic field. |
Plot particle trajectories in a magnetic field. |
Specialized Plots for QS Metrics
|
Plot \(|B|\) on a surface vs the Boozer poloidal and toroidal angles. |
|
Plot Fourier harmonics of \(|B|\) in Boozer coordinates. |
|
Plot quasi-symmetry errors f_B, f_C, and f_T as normalized flux functions. |
Plotting energetic particle proxies
|
Plot the energetic proxy metric γ_c for a single flux surface. |
Misc Plotting Utilities
|
Plot spectral coefficient magnitudes vs spectral mode number. |
|
Plot basis functions. |
|
Plot the location of collocation nodes on the zeta=0 plane. |
|
Plot the DESC logo. |
Exporting Paraview Files
Note that these utility functions are not regularly tested and maybe incompatible with newer version of Paraview. Please see the README of the desc.external for more details.
Export coils data for Paraview as VTP files. |
|
Export a constant rho surface data for Paraview as VTK file. |
|
Export equilibrium volume data for Paraview as VTK file. |