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 to rho=0.

Parameters:
  • state (GVEC state object)

  • quantities (str, list[str], optional) – Default is "mod_B".

  • nzeta (int, numpy.ndarray, optional) – zeta resolution or array of points to plot at. Default is 51.

  • subplot_grid (list[int], None, optional) – The grid shape of [nrow,ncol] for the subplots. If None, grid will be automatically determined. Default is None.

  • plot_kwargs (dict, optional) – Any **kwargs to send to the plt.figure() function. For example plot_kwargs={'figsize': (8,8)}. See the matplotlib documentation for a list of kwargs.

Return type:

matplotlib.pyplot.figure object and numpy.ndarray of matplotlib.axis._axis.Axes object(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 101

  • subplot_grid (list[int], None, optional) – The grid shape for the subplots. If None, grid will be automatically determined. Default is None.

  • 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 iota profile plot. Default 3

  • plot_kwargs (dict, optional) –

    Any **kwargs to send to the plt.figure() function. For example plot_kwargs={'figsize': (8,8)}. See the matplotlib documentation for a list of kwargs.

Return type:

matplotlib.pyplot.figure object and numpy.ndarray of matplotlib.axis._axis.Axes object(s).