devctrl.data.time.plot.plot_time_data#

plot_time_data(data: ndarray[tuple[Any, ...], dtype[_ScalarT]] | TimeData, what: str | list[str], xkey: str = 't', columns: list[str] | None = None, fig=None, ax=None, xlabel: str | bool = True, ylabel: str | bool = True, title: str | bool | None = None, mode=None, xlog: bool = False, normalize: bool = False, subplot_kw: dict | None = None, transforms: list[Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]], list[str]], tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], list[str]]]] | None = None, ts: list[float] | tuple[float, float] | None = None, plot_kws: dict | list[dict] | None = None, **plot_kw) tuple[Figure, Axes][source]#

Plotter for generic time data.

Parameters:
  • data – Either a numpy array or a TimeData object

  • xkey – Which column to plot onto the x-axis

  • columns – Arry of columns into data. Only required when data is a numpy array

  • fig – Optional matplotlib figure

  • ax – Optional matplotlib axes

  • xlabel – Optional label. If True, a value is automatically from Data.get_column_tex_label_with_unit_and_scale() using the xkey

  • ylabel – Optional label. If True, a value is automatically from Data.get_column_tex_label_with_unit_and_scale() using the column to plot (what)

  • title – Optional plot title

  • mode – Optional data mode

  • xlog – Whether to set the x-axis to log-scale

  • normalize – Whether to normalize the data

  • subplot_kw – Keywords to pass to plt.subplots() if no fig or ax is given

  • transforms – List of transforms to pass to get_time_data if data is a TimeData object

  • ts – Time values to pass to get_time_data if data is a TimeData object

  • what – Which column(s) to plot

Raises:

ValueError

Returns:

fig, ax