Skip to content

Commit 3026ab4

Browse files
authored
Merge pull request #306 from anevolbap/issue_259-plot-did_skl
Fix #259: Annotation in `did_skl` notebook plot.
2 parents 3bb81a7 + 8b7b208 commit 3026ab4

File tree

2 files changed

+8
-32
lines changed

2 files changed

+8
-32
lines changed

causalpy/skl_experiments.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,10 @@ def plot(self, round_to=None):
475475
)
476476
ax.annotate(
477477
"causal\nimpact",
478-
xy=(1.05, np.mean([self.y_pred_counterfactual, self.y_pred_treatment[1]])),
478+
xy=(
479+
1.05,
480+
np.mean([self.y_pred_counterfactual[0], self.y_pred_treatment[1]]),
481+
),
479482
xycoords="data",
480483
xytext=(5, 0),
481484
textcoords="offset points",

docs/source/notebooks/did_skl.ipynb

Lines changed: 4 additions & 31 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)