Plotting#

The plotting module provides a unified interface for visualizing difference-in-differences results, sensitivity analyses, and event studies. All plotting functions return plotnine ggplot objects that can be further customized using standard plotnine syntax.

DiD Result Plots#

High-level functions for plotting treatment effect estimates from DiD analyses. Automatically selects the appropriate visualization based on the result type (group-time ATT, event study, and aggregated effects).

plot_gt

Plot group-time average treatment effects.

plot_event_study

Create event study plot for dynamic treatment effects.

plot_agg

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

Continuous Treatment Plots#

Functions for visualizing dose-response relationships from continuous treatment DiD.

plot_dose_response

Plot dose-response function for continuous treatment.

Intertemporal DiD Plots#

Functions for visualizing dynamic treatment effects from the intertemporal DiD estimator.

plot_multiplegt

Create event study plot for intertemporal treatment effects.

Sensitivity Analysis Plots#

Functions for visualizing HonestDiD sensitivity analysis results.

plot_sensitivity

Create sensitivity analysis plot for HonestDiD results.

Data Converters#

To extract the underlying data from any result object as a polars DataFrame, use to_df. See the Result Extraction API reference for details and the full list of individual converters.