plot_svd

plot_svd(res: xr.Dataset, axes: Axes, linlog: bool = False, linthresh: float = 1, cycler: Cycler | None = cycler('color', [<ColorCode.black: '#000000'>, <ColorCode.red: '#ff0000'>, <ColorCode.blue: '#0000ff'>, <ColorCode.green: '#00ff00'>, <ColorCode.magenta: '#ff00ff'>, <ColorCode.cyan: '#00ffff'>, <ColorCode.yellow: '#ffff00'>, <ColorCode.green4: '#008b00'>, <ColorCode.orange: '#ff8c00'>, <ColorCode.brown: '#964b00'>, <ColorCode.grey: '#808080'>, <ColorCode.violet: '#9400d3'>, <ColorCode.turquoise: '#40e0d0'>, <ColorCode.maroon: '#800000'>, <ColorCode.indigo: '#4b0082'>]), nr_of_data_svd_vectors: int = 4, nr_of_residual_svd_vectors: int = 2, show_data_svd_legend: bool = True, show_residual_svd_legend: bool = True, irf_location: float | None = None, use_svd_number: bool = False) None[source]

Plot SVD (Singular Value Decomposition) of data and residual.

Parameters:
  • res (xr.Dataset) – Result dataset

  • axes (Axes) – Axes to plot the SVDs on (needs to be at least 2x3).

  • linlog (bool) – Whether to use ‘symlog’ scale or not. Defaults to False.

  • linthresh (float) – A single float which defines the range (-x, x), within which the plot is linear. This avoids having the plot go to infinity around zero. Defaults to 1.

  • cycler (Cycler | None) – Plot style cycler to use. Defaults to PlotStyle().cycler.

  • nr_of_data_svd_vectors (int) – Number of data SVD vector to plot. Defaults to 4.

  • nr_of_residual_svd_vectors (int) – Number of residual SVD vector to plot. Defaults to 2.

  • show_data_svd_legend (bool) – Whether or not to show the data SVD legend. Defaults to True.

  • show_residual_svd_legend (bool) – Whether or not to show the residual SVD legend. Defaults to True.

  • irf_location (float | None) – Location of the irf by which the time axis will get shifted. If it is None the time axis will not be shifted. Defaults to None.

  • use_svd_number (bool) – Whether to use singular value number (starts at 1) instead of singular value index (starts at 0) for labeling in plot. Defaults to False.