Skip to content

API reference

The reference is generated from the docstrings, so it always matches the code. The guides show the same functionality with figures.

Most of plasma-plots is reached through accessors on the objects Struphy returns:

Accessor What it does
array.plasma.plot Plots of one labeled array: time series, slices, animations, spectra, 3-D views
array.plasma.analysis Diagnostics of one labeled array: fits, norms, errors, spectra, vector calculus
array.plasma.data The selected data behind every plot, without drawing it
dataset.plasma Plots, diagnostics and data of marker Datasets such as orbits
out.plot and out.analysis Whole-run plots and diagnostics of a Struphy Output

A method’s page lists every parameter, including those it shares with the function it wraps.

The functions behind the accessors, to call on a plain xarray.DataArray, and the analytic theory:

Module Contents
plasma_plots.plotting Plotting functions for labeled Struphy output
plasma_plots.analysis Numerical diagnostics: fits, norms, errors, integrals, vector calculus, orbits
plasma_plots.spectral Fourier transforms, filters, peaks, mode spectra, matrix pencil
plasma_plots.spectral_plots Plots of spectra, filters, modes and fits
plasma_plots.pyvista_plots Three-dimensional PyVista views and VTK export
plasma_plots.arrays Labels, validation and helpers for labeled arrays
plasma_plots.theory Analytic theory: kinetic, wave, orbit, exact-solution and numerics results (see the Theory guide)
plasma_plots.plotly_backend backend="plotly": the conversion of Matplotlib figures into interactive Plotly figures (see Interactive plots)
plasma_plots.tikz_backend backend="tikz": the conversion into TikZ/pgfplots figures for LaTeX, by maxplotlib (see LaTeX figures)
plasma_plots.gallery Output helpers of the example gallery: Plotly figure files, profiling exports and metadata (pip install "plasma-plots[gallery]")

The full module tree is under All modules in the sidebar. For other tools, each package also has an objects.inv (for Sphinx and mkdocstrings links) and an llms.txt at /api/plasma_plots/.