SyntheticDifferenceInDifferences.plot#

SyntheticDifferenceInDifferences.plot(*, round_to=None, show=True, legend_kwargs=None)[source]#

Plot SDiD results: counterfactual, period impact, and cumulative impact.

Parameters:
  • round_to (int | None) – Number of decimals used to round the ATT in the title. Defaults to 2. Use None for raw values.

  • show (bool) – Whether to call matplotlib.pyplot.show() after drawing. Defaults to True.

  • legend_kwargs (dict[str, Any] | None) – Keyword arguments applied to the top-axis legend in place after the figure is built. Supported keys include loc, bbox_to_anchor, fontsize, frameon, title, and optionally bbox_transform alongside bbox_to_anchor. See _render_plot().

Returns:

  • fig (matplotlib.figure.Figure) – The figure containing the three stacked panels.

  • ax (numpy.ndarray) – Array of the three matplotlib.axes.Axes instances.

Return type:

tuple[Figure, ndarray]