I have the following data (four equal-length arrays) :
a = [1, 4, 5, 2, 8, 9, 4, 6, 1, 0, 6]
b = [4, 7, 8, 3, 0, 9, 6, 2, 3, 6, 7]
c = [9, 0, 7, 6, 5, 6, 3, 4, 1, 2, 2]
d = [La, Lb, Av, Ac, Av, By, Lh, By, Lg, Ac, Bt]
I am making a 3d plot of arrays a, b, c :
import pylab
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(a,b,c)
plt.show()
Now, I want to color these scattered points using the array named 'd' such that; if the first letter of corresponding 'i'th element value in d is 'L', then colour the point red, if it starts with 'A' colour it green and if it starts with 'B', colour it blue.
So, first point (1,4,9) should be red, second(4,7,0) red too, third(5,8,7) should be green and so on..
Is it possible to do so? Please help if you have some idea :)