uataq.Network.plot_availability#

Network.plot_availability(availability=None, ax=None, **kwargs)[source]#

Plot when each site has data for the pollutant, colored by level.

Time runs along x and each site gets a row, with a bar wherever it has data, shaded light (raw) to dark (final) by LEVEL_COLORS. Requires the optional matplotlib dependency.

Parameters:
  • availability (DataFrame | None) – The output of get_availability(). If None, it is computed, passing kwargs along. Compute it once and pass it in to restyle the plot without re-reading the archive.

  • ax (matplotlib.axes.Axes, optional) – Axes to draw on. Default is None, which makes a new figure.

  • **kwargs – Passed to get_availability() when availability is None.

Returns:

The axes drawn on.

Return type:

matplotlib.axes.Axes