how to apply colors to 1d array

I have a numpy array size of 20 and I want to give each element a color when plotting point cloud

data = np.array([1,2,3,4,5,6,7,8,9,10,20, 19, 18, 17, 16, 15, 14, 13,12,11])


colors # different colors 
colors[data]

I'd like to create colors so that every element of the array represent a color of the unspecified size of an array



Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept