X = irisData.data
Y = irisData.target
+colors = ["red", "green", "blue"]
+
x = 0
y = 1
+for i in range(3):
+ pl.scatter(X[Y == i][:, x], X[Y == i][:, y], color=colors[i],
+ label=irisData.target_names[i])
+pl.legend()
+pl.xlabel(irisData.feature_names[x])
+pl.ylabel(irisData.feature_names[y])
+pl.title(u"Données Iris - dimension des sépales uniquement")
+pl.show()
-colors = ["red", "green", "blue"]
+x = 2
+y = 3
+for i in range(3):
+ pl.scatter(X[Y == i][:, x], X[Y == i][:, y], color=colors[i],
+ label=irisData.target_names[i])
+pl.legend()
+pl.xlabel(irisData.feature_names[x])
+pl.ylabel(irisData.feature_names[y])
+pl.title(u"Données Iris - dimension des pétales uniquement")
+pl.show()
+
+x = 0
+y = 3
+for i in range(3):
+ pl.scatter(X[Y == i][:, x], X[Y == i][:, y], color=colors[i],
+ label=irisData.target_names[i])
+pl.legend()
+pl.xlabel(irisData.feature_names[x])
+pl.ylabel(irisData.feature_names[y])
+pl.title(u"Données Iris - dimension des sépales et pétales")
+pl.show()
+
+x = 1
+y = 2
+for i in range(3):
+ pl.scatter(X[Y == i][:, x], X[Y == i][:, y], color=colors[i],
+ label=irisData.target_names[i])
+pl.legend()
+pl.xlabel(irisData.feature_names[x])
+pl.ylabel(irisData.feature_names[y])
+pl.title(u"Données Iris - dimension des sépales et pétales")
+pl.show()
+x = 0
+y = 2
for i in range(3):
pl.scatter(X[Y == i][:, x], X[Y == i][:, y], color=colors[i],
label=irisData.target_names[i])
+pl.legend()
+pl.xlabel(irisData.feature_names[x])
+pl.ylabel(irisData.feature_names[y])
+pl.title(u"Données Iris - dimension des sépales et pétales")
+pl.show()
+x = 1
+y = 3
+for i in range(3):
+ pl.scatter(X[Y == i][:, x], X[Y == i][:, y], color=colors[i],
+ label=irisData.target_names[i])
pl.legend()
pl.xlabel(irisData.feature_names[x])
pl.ylabel(irisData.feature_names[y])
-pl.title(u"Données Iris - dimension des sépales uniquement")
+pl.title(u"Données Iris - dimension des sépales et pétales")
pl.show()