plot_concentrations

plot_concentrations(res: xr.Dataset, ax: Axis, center_λ: float | None, linlog: bool = False, linthresh: float = 1, linscale: float = 1, main_irf_nr: int = 0, 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'>]), title: str = 'Concentrations') None[source]

Plot traces on the given axis ax.

Parameters:
  • res (xr.Dataset) – Result dataset from a pyglotaran optimization.

  • ax (Axis) – Axis to plot the traces on

  • center_λ (float | None) – Center wavelength (λ in nm)

  • 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.

  • linscale (float) – This allows the linear range (-linthresh to linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range. Defaults to 1.

  • main_irf_nr (int) – Index of the main irf component when using an irf parametrized with multiple peaks. Defaults to 0.

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

  • title (str) – Title used for the plot axis. Defaults to “Concentrations”.

See also

get_shifted_traces