moderndid.plots.plot_agg#

moderndid.plots.plot_agg(result: AGGTEResult | DDDAggResult, show_ci: bool = True, ref_line: float | None = 0, xlab: str | None = None, ylab: str | None = None, title: str | None = None, **_kwargs: Any) ggplot[source]#

Create plot for aggregated treatment effects by group or calendar time.

Parameters:
resultAGGTEResult or DDDAggResult

Aggregated treatment effect result with group or calendar aggregation.

show_cibool, default=True

Whether to show confidence intervals as error bars.

ref_linefloat or None, default=0

Y-value for reference line. Set to None to hide.

xlabstr, optional

X-axis label. Defaults based on aggregation type.

ylabstr, optional

Y-axis label. Defaults to “ATT”.

titlestr, optional

Plot title. Defaults based on aggregation type.

Returns:
plotnine.ggplot

A plotnine ggplot object that can be further customized.