plot_historical_decomposition#

impulso.plotting.plot_historical_decomposition(result, figsize=None)[source]#

Plot historical decomposition as stacked bar charts.

One panel per response variable, showing the propagated contribution of each structural shock over time, with the posterior median of the total deviation from the deterministic baseline overlaid as a line. The line is the median of the per-draw sum over shocks, so it matches data - result.baseline() exactly; because median-of-sum differs from sum-of-medians, it need not exactly top the median bars. Shock labels come from the result’s shock coordinate, so partially-identified decompositions (with an unidentified_remainder column) render correctly.

Parameters:
Returns:

Matplotlib Figure.

Return type:

Figure