Skip to content

Commit 73b98d4

Browse files
NelleVGaelVaroquaux
authored andcommitted
Small explanation on the plot_mds example
1 parent 06fc359 commit 73b98d4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/manifold/plot_mds.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Multi-dimensional scaling
44
=========================
55
6+
An illustration of the metric and non-metric MDS on generated noisy data.
7+
8+
The reconstructed points using the metric MDS and non metric MDS are slightly
9+
shifted to avoid overlapping..
610
"""
711

812
# Author: Nelle Varoquaux <[email protected]>
@@ -52,9 +56,9 @@
5256
fig = plt.figure(1)
5357
ax = plt.axes([0., 0., 1., 1.])
5458

55-
plt.scatter(X_true[:, 0], X_true[:, 1], c='r', s=10)
56-
plt.scatter(pos[:, 0] + 0.2, pos[:, 1] + 0.2, s=10, c='g')
57-
plt.scatter(npos[:, 0] - 0.2, npos[:, 1] - 0.2, s=10, c='b')
59+
plt.scatter(X_true[:, 0], X_true[:, 1], c='r', s=20)
60+
plt.scatter(pos[:, 0] + 0.2, pos[:, 1] + 0.2, s=20, c='g')
61+
plt.scatter(npos[:, 0] - 0.2, npos[:, 1] - 0.2, s=20, c='b')
5862
plt.legend(('True position', 'MDS', 'NMDS'))
5963

6064
similarities = similarities.max() / similarities * 100

0 commit comments

Comments
 (0)