fips.visualization.plot_comparison#
- fips.visualization.plot_comparison(*series, x=None, truth=None, errors=None, kind=None)[source]#
Compare multiple aligned series with optional errors and truth values.
Plots multiple series (e.g., prior, posterior, observations) on the same axes with optional error bars/bands and truth values for comparison.
- Parameters:
*series (pd.Series or Vector or Block) – Variable number of series to compare.
x (str or int, optional) – Name or level of the index to use for x-axis. Required if series have MultiIndex.
truth (pd.Series or Vector or Block, optional) – True values to plot as reference.
errors (Sequence of pd.DataFrame or CovarianceMatrix or Matrix or pd.Series or None, optional) – Error estimates for each series. Must match length of series. If CovarianceMatrix or Matrix, extracts diagonal as standard deviations.
kind ({'line', 'bar'}, optional) – Plot type. If None, auto-detects based on x-axis data type.
- Returns:
fig (matplotlib.figure.Figure) – The figure object.
ax (matplotlib.axes.Axes) – The axes object.