Skip to content

Commit 70ac2fd

Browse files
authored
Merge pull request #69 from DoubleML/m-fix-labels
Fix wrong labels
2 parents f93d2db + 2cd0886 commit 70ac2fd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

doc/guide/basics.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -476,14 +476,13 @@ The third term :math:`c^*` vanishes in probability if sample splitting is applie
476476

477477
.. ipython:: python
478478
479-
ax = sns.kdeplot(theta_ols, shade=True)
480-
sns.kdeplot(theta_nonorth, shade=True, ax=ax);
481-
sns.kdeplot(theta_orth_nosplit, shade=True);
482-
sns.kdeplot(theta_dml, shade=True);
483-
labels = ['True $\\theta$', 'OLS', 'Non-orthogonal ML', 'Double ML (no sample splitting)', 'Double ML with cross-fitting']
484-
ax.axvline(0.5, color='k', label='True theta');
479+
ax = sns.kdeplot(theta_ols, shade=True, label='OLS')
480+
sns.kdeplot(theta_nonorth, shade=True, ax=ax, label='Non-orthogonal ML');
481+
sns.kdeplot(theta_orth_nosplit, shade=True, label='Double ML (no sample splitting)');
482+
sns.kdeplot(theta_dml, shade=True, label='Double ML with cross-fitting');
483+
ax.axvline(0.5, color='k', label='True $\\theta$');
485484
@savefig comparison.png width=5in
486-
ax.legend(labels);
485+
ax.legend();
487486
488487
.. tabbed:: R
489488

0 commit comments

Comments
 (0)