gvec.plotting.plots1d#
- gvec.plotting.plots1d.plot_on_axis(state: State, quantities: str | list[str] = 'mod_B', nzeta: int | ndarray = 51, subplot_grid: list[int] | None = None, plot_kwargs: dict = {})#
Plot a equilibrium quantity (or list of) along the magnetic axis. Note that the quantities are always evaluated off-axis (
rho=[1.1e-4,2.2e-4,3.3e-4],theta=0) and extrapolated quadratically torho=0.- Parameters:
state (GVEC state object)
quantities (str, list[str], optional) – Default is
"mod_B".nzeta (int, numpy.ndarray, optional) –
zetaresolution or array of points to plot at. Default is51.subplot_grid (list[int], None, optional) – The grid shape of
[nrow,ncol]for the subplots. IfNone, grid will be automatically determined. Default isNone.plot_kwargs (dict, optional) – Any
**kwargsto send to theplt.figure()function. For exampleplot_kwargs={'figsize': (8,8)}. See the matplotlib documentation for a list of kwargs.
- Return type:
matplotlib.pyplot.figureobject andnumpy.ndarrayofmatplotlib.axis._axis.Axesobject(s).
- gvec.plotting.plots1d.plot_radial_profile(state: State, quantities: str | list[str] = ['iota', 'p', 'I_tor', 'I_pol'], nrho: int | ndarray = 101, subplot_grid: list[int] | None = None, xaxis: Literal['rho', 'rho_squared'] = 'rho', n_rationals: int = 3, plot_kwargs: dict = {})#
Plot the radial profile of given equilibrium quantities.
- Parameters:
state (GVEC state object)
quantities (str, list[str], optional) – Default is
["iota","p","I_tor","I_pol"].nrho (int, numpy.ndarray) – The number of or specific 1D array of radial points to plot at. Default is
101subplot_grid (list[int], None, optional) – The grid shape for the subplots. If
None, grid will be automatically determined. Default isNone.xaxis (
"rho"or"rho_squared", optional) – What quantity to plot on the x axis. Default is"rho".n_rationals (int, optional) – If non-zero, show the largest \(n\) rationals on any
iotaprofile plot. Default3plot_kwargs (dict, optional) –
Any
**kwargsto send to theplt.figure()function. For exampleplot_kwargs={'figsize': (8,8)}. See the matplotlib documentation for a list of kwargs.
- Return type:
matplotlib.pyplot.figureobject andnumpy.ndarrayofmatplotlib.axis._axis.Axesobject(s).