S5.visualisation.plot_trace#
- S5.visualisation.plot_trace(hist: SSHistory, ax: Axes | None = None, set_limit=True, **kwargs) Tuple[Figure, Axes] [source]#
Plots the location of the car on a time-distance graph.
This can be used in conjunction with plot_contor to show how the car is positioned in relation to clouds or period of high wind. Requires the columns ‘DateTime’ and ‘Distance(km)’ present in the DataFrame.
- Parameters:
hist – History file to plot the trace.
ax – Optional, axes to plot the trace on.
set_limit – Set the axes limit only to the period where position data is present
**kwargs – Additional arguments to pass along to matplotlib.pyplot.plot.
- Returns:
A tuple of (figure, axes)
- Raises:
KeyError – If DateTime is not present in
Examples
>>> history = TP.SSHistory("C:/path/to/History.dat") >>> weather = get_weather(history.filename) >>> history.add_timestamp('20231023') >>> weather.add_timestamp('20231023') >>> plot_contor( >>> "DirectSun (W/m2)", >>> weather, >>> display_name="Direct Irradiation (W/m²)", >>> cmap="inferno", >>> ax=ax[0], >>> ) >>> plot_trace(hist=history, ax=ax[0], lw=2)