Newer
Older
# Exercise 2.3.6
from ex2_3_1 import *
ax = f.add_subplot(111, projection="3d") # Here the mpl_toolkits is used
class_mask = y == c
s = ax.scatter(
X[class_mask, ind[0]], X[class_mask, ind[1]], X[class_mask, ind[2]], c=colors[c]
)
ax.view_init(30, 220)
ax.set_xlabel(attributeNames[ind[0]])
ax.set_ylabel(attributeNames[ind[1]])
ax.set_zlabel(attributeNames[ind[2]])
print("Ran Exercise 2.3.6")