devctrl.data.time.plot.plot_time_data#
- plot_time_data(data: NDArray | 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, list[str]], tuple[NDArray, 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 whendatais a numpy arrayfig – Optional matplotlib figure
ax – Optional matplotlib axes
xlabel – Optional label. If
True, a value is automatically fromData.get_column_tex_label_with_unit_and_scale()using the xkeyylabel – Optional label. If
True, a value is automatically fromData.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 nofigoraxis giventransforms – List of transforms to pass to
get_time_dataifdatais a TimeData objectts – Time values to pass to
get_time_dataifdatais a TimeData objectwhat – Which column(s) to plot
- Raises:
ValueError –
- Returns:
fig, ax