Apr-20-2019, 07:37 PM
Hi everyone, I'm very new with Python. I found this code and I would like to change the color of a specific position in this 3d-matrix.
Thanks in advance,
Regards,
![[Image: e1DQ6kA.png]](https://i.imgur.com/e1DQ6kA.png)
Thanks in advance,
Regards,
![[Image: e1DQ6kA.png]](https://i.imgur.com/e1DQ6kA.png)
from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111, projection='3d') z = [8,7,6,7,9,10,9,8,10,8,9,10,9,8,10,8,9,10,9,8,10,8,9,10] x = [1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4] y = [1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6] ax.scatter(x, y, z, c='r', marker='o') ax.set_xlabel('X Label') ax.set_ylabel('Y Label') ax.set_zlabel('Z Label') plt.show()