devctrl.data.plot.plot_data_on_ax#

plot_data_on_ax(data: ndarray[tuple[Any, ...], dtype[_ScalarT]], columns: list[str], ax: Axes, key: str, xkey: str, ylabel: str | bool = True, scale_factor: None | float | int = None, error_shade=False, data_getter_obj=None, is_normalized=False, mode=None, max_ylim: None | tuple[float, float] = None, zero_hline=None, zero_hline_keys: list[str] | None = None, scatter_in_colors: list[str] | None = None, scatter_in_colors_kw: dict = {'marker': 'o', 's': 12}, scatter_in_colors_dot_kw: dict | None = {'color': 'black', 'marker': '.', 's': 8}, **plot_kw)[source]#

Plot column data on a single axis

Parameters:
  • data – Numpy array with <columns>

  • ax – Matplotlib axes

  • key – Which key of <columns> to plot

  • columns – List of column keys

  • xkey – Which key of <columns> to plot on the x-axis (wl or E)

  • ylabel – Either a label (str) or True to use the PrsData.get_column_tex_label_with_unit_and_scale() or False to not use a label

  • scale_factor – Which scaling to apply to the ylabel.

  • error_shade – Whether to include the errors by drawing a semi-transparent shade around the plot line

  • plot_kw – Keyword arguments to pass to the axes.plot() function

  • mode – Whether to use reflection or transmission labels

  • zero_hline – Whether to plot a horizontal line at zero. If None, automatically plots one for certain keys

  • zero_hline_keys – List of column keys for which to automatically plot a zero hline

  • scatter_in_colors – If given, scatter the data in the given colors instead of plotting the line

  • scatter_in_colors_kw – Keywords of the scatter plots. Colors are taken from scatter_in_colors list

  • scatter_in_colors_dot_kw – If not None, scatter single-colored dots in addition to the colored dots