Friends,

I tried to do a 3d scatter plot. The following is my code. However i dnt know how to set different colors and marker for x, y and z. Someone kindly help in doing the same. I tried to give a sequence of colors as c=[‘black’,‘red’,‘blue’] but i dnt get what i want.

## ···

import numpy as np

from mpl_toolkits.mplot3d import Axes3D

import matplotlib.pyplot as plt

fig = plt.figure(figsize=(4,4))

ax = Axes3D(fig)

x=np.reshape(np.loadtxt(‘PR1’),15000)

y=np.reshape(np.loadtxt(‘PR2’),15000)

z=np.reshape(np.loadtxt(‘PR3’),15000)

ax.scatter(x[:],y[:],z[:], marker=‘o’)

plt.savefig(‘img.png’,dpi=200)

plt.show()

Thanks,

Bala