Skip to content

Commit e31ba77

Browse files
authored
DOC fix deprecation warning in plot_lof_novelty_detection (scikit-learn#27451)
1 parent 20dad58 commit e31ba77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/neighbors/plot_lof_novelty_detection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"""
2727

2828
import matplotlib
29+
import matplotlib.lines as mlines
2930
import matplotlib.pyplot as plt
3031
import numpy as np
3132

@@ -71,7 +72,7 @@
7172
plt.xlim((-5, 5))
7273
plt.ylim((-5, 5))
7374
plt.legend(
74-
[a.collections[0], b1, b2, c],
75+
[mlines.Line2D([], [], color="darkred"), b1, b2, c],
7576
[
7677
"learned frontier",
7778
"training observations",

0 commit comments

Comments
 (0)