S5.visualisation.plot_contor#

S5.visualisation.plot_contor(contour_parameter: str, weather: SSWeather, display_name: str = '', cmap='viridis', ax=None, **kwargs) Tuple[Figure, Axes][source]#

Plots a variable from the weather file as a contour map.

The plot will have space in the x-axis and time in the y-axis.

Parameters:
  • contour_parameter – Column name of the parameter to plot.

  • weather – Weather file containing the data.

  • display_name – Name of the variable to label the figure.

  • cmap – Colormap to use, passed onto matplotlib.axes.Axes.pcolormesh, default to be ‘viridis’.

  • ax – Optional, if present then this will be axes to plot on.

  • **kwargs – Additional arguments to pass along to matplotlib.axes.Axes.pcolormesh.

Returns:

A tuple of (figure, axes)

Examples

>>> weather = TP.SSWeather("C:/path/to/Weather.dat")
>>> weather.add_timestamp('20231023')
>>> plot_contor(
>>>     "DirectSun (W/m2)",
>>>     weather,
>>>     display_name="Direct Irradiation (W/m²)",
>>>     cmap="inferno",
>>>     ax=ax[0],
>>> )