DOC make `plot_mean_shift.py` more colourblind friendly
@@ -42,20 +42,21 @@ print("number of estimated clusters : %d" % n_clusters_)
# Plot result
# -----------
import matplotlib.pyplot as plt
-from itertools import cycle
plt.figure(1)
plt.clf()
-colors = cycle("bgrcmyk")
+colors = ["#dede00", "#377eb8", "#f781bf"]
+markers = ["x", "o", "^"]
+
for k, col in zip(range(n_clusters_), colors):
my_members = labels == k
cluster_center = cluster_centers[k]
- plt.plot(X[my_members, 0], X[my_members, 1], col + ".")
+ plt.plot(X[my_members, 0], X[my_members, 1], markers[k], color=col)
plt.plot(
cluster_center[0],
cluster_center[1],
- "o",
+ markers[k],
markerfacecolor=col,
markeredgecolor="k",
markersize=14,
