2023-01-28

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



No comments:

Post a Comment