8000 [MRG] Modify Classification module example matplotlibv2 (#8516) · scikit-learn/scikit-learn@0ee92d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ee92d8

Browse files
rishikksh20lesteve
authored andcommitted
[MRG] Modify Classification module example matplotlibv2 (#8516)
1 parent 7d1afd7 commit 0ee92d8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

examples/classification/plot_classifier_comparison.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@
9595
if ds_cnt == 0:
9696
ax.set_title("Input data")
9797
# Plot the training points
98-
ax.scatter(X_train[:, 0], X_train[:, 1], c=y_train, cmap=cm_bright)
98+
ax.scatter(X_train[:, 0], X_train[:, 1], c=y_train, cmap=cm_bright,
99+
edgecolors='k')
99100
# and testing points
100-
ax.scatter(X_test[:, 0], X_test[:, 1], c=y_test, cmap=cm_bright, alpha=0.6)
101+
ax.scatter(X_test[:, 0], X_test[:, 1], c=y_test, cmap=cm_bright, alpha=0.6,
102+
edgecolors='k')
101103
ax.set_xlim(xx.min(), xx.max())
102104
ax.set_ylim(yy.min(), yy.max())
103105
ax.set_xticks(())
@@ -122,10 +124,11 @@
122124
ax.contourf(xx, yy, Z, cmap=cm, alpha=.8)
123125

124126
# Plot also the training points
125-
ax.scatter(X_train[:, 0], X_train[:, 1], c=y_train, cmap=cm_bright)
127+
ax.scatter(X_train[:, 0], X_train[:, 1], c=y_train, cmap=cm_bright,
128+
edgecolors='k')
126129
# and testing points
127130
ax.scatter(X_test[:, 0], X_test[:, 1], c=y_test, cmap=cm_bright,
128-
alpha=0.6)
131+
edgecolors='k', alpha=0.6)
129132

130133
ax.set_xlim(xx.min(), xx.max())
131134
ax.set_ylim(yy.min(), yy.max())

0 commit comments

Comments
 (0)
0