Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cab6c9

Browse files
committed
DOC add missing plt.figure() for multiplot support in ROC example
1 parent dae905c commit 5cab6c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/plot_roc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
fpr["micro"], tpr["micro"], _ = roc_curve(y_test.ravel(), y_score.ravel())
7474
roc_auc["micro"] = auc(fpr["micro"], tpr["micro"])
7575

76-
# Plot of one ROC curve
76+
# Plot of a ROC curve for a specific class
77+
plt.figure()
7778
plt.plot(fpr[2], tpr[2], label='ROC curve (area = %0.2f)' % roc_auc[2])
7879
plt.plot([0, 1], [0, 1], 'k--')
7980
plt.xlim([0.0, 1.0])
@@ -85,6 +86,7 @@
8586
plt.show()
8687

8788
# Plot ROC curve
89+
plt.figure()
8890
plt.plot(fpr["micro"], tpr["micro"],
8991
label='micro-average ROC curve (area = {0:0.2f})'
9092
''.format(roc_auc["micro"]))

0 commit comments

Comments
 (0)