atmospy.dielplot#

atmospy.dielplot(data=None, *, x=None, y=None, ax=None, ylim=None, xlabel=None, ylabel=None, title=None, color=None, show_iqr=True, plot_kws=None, **kwargs)#

Plot the diel (e.g., diurnal) trend for a pollutant.

Diel plots can be incredibly useful for understanding daily patterns of air pollutants.

Parameters:
datapandas.DataFrame

Tabular data as a pandas DataFrame.

xkey in data

Variable that corresponds to the timestamp in data.

ykey in data

Variable that corresponds to the pollutant of interest.

axmatplotlib.axes._axes.Axes, optional

An axis to plot on; if not defined, one will be created, by default None

ylimtuple of floats, optional

A tuple describing (ymin, ymax), by default None

xlabelstr, optional

The label for the x-axis, by default None

ylabelstr, optional

The label for the y-axis, by default None

titlestr, optional

The title for the plot, by default None

colorstr, optional

Specify the color to use in the figure

shoq_iqrbool, optional

If True, plot the interquartile range as a shaded region, default True

plot_kwsdict or None, optional

Additional keyword arguments are passed directly to the underlying plot call , by default None

Returns:
matplotlib.axes._axes.Axes

Examples

Plot a simple heatmap for the entire year.

>>> df = atmospy.load_dataset("us-bc")
>>> atmospy.dielplot(data=df, x="Timestamp GMT", y="Sample Measurement")