pyrfu.plot.plot_spectr module#

pyrfu.plot.plot_spectr.plot_spectr(axis, inp, yscale: str = 'linear', cscale: str = 'linear', clim: list | None = None, cmap: str | None = None, colorbar: str = 'right', **kwargs)[source]#

Plot a spectrogram using pcolormesh.

Parameters:
  • axis (matplotlib.pyplot.subplotsaxes) – Target axis to plot. If None create a new figure.

  • inp (xarray.DataArray) – Input 2D data to plot.

  • yscale ({"linear", "log"}, Optional) – Y-axis scaling. Default is “” (linear).

  • cscale ({"linear", "log"}, Optional) – C-axis scaling. Default is “” (linear).

  • clim (list, Optional) – C-axis bounds. Default is None (autolim).

  • cmap (str, Optional) – Colormap. Default is “jet”.

  • colorbar (str, Optional) – Location of the colorbar with respect to the axis. Set to “none” to hide.

  • **kwargs – Keyword arguments.

Returns:

  • fig (figure) – Figure with axis.

  • axs (matplotlib.pyplot.subplotsaxes) – Axis with spectrum.

  • caxs (matplotlib.pyplot.subplotsaxes) – Only if colorbar is True.