I have a time series X, which I can plot in x-y plane.
plot(X(:,1), X(:,2), 'r.')
This gives a red dot colour. What I want to do is I want to make this graph such that the colour represents the colour of the rainbow. (Red at the start, violet in the end) This is so we can give a time sense of the trajectory.
How do we do this?