causalpy.plot_utils
Plotting utility functions.
- causalpy.plot_utils.plot_xY(x, Y, ax, plot_hdi_kwargs=None, hdi_prob=0.94, label=None)
Utility function to plot HDI intervals.
- Parameters:
x (
Union
[DatetimeIndex
,array
]) – Pandas datetime index or numpy array of x-axis valuesy – Xarray data array of y-axis data
ax (
Axes
) – Matplotlib ax objectplot_hdi_kwargs (
Optional
[Dict
[str
,Any
]]) – Dictionary of keyword arguments passed to ax.plot()hdi_prob (
float
) – The size of the HDI, default is 0.94Y (DataArray)
- Return type:
Tuple
[Line2D
,PolyCollection
]