I am generating many (thousands) of plots using very large data. I need a very simple way to make my markers different colors, but each element needs to keep it's color. In my main for loop I have:
for i = 1:finaltime
plot(pos(i,:), track(i,:), 'o', 'MarkerSize', 9) ;
Where "pos" tells the position of the element (there are 1000) and "track" specifies the track number the element is on (there are 4). So I need 1000 different colors for each marker (which corresponds to each column) in the matrix "pos", which is finaltime by 1000 in size. For every figure generated (there will be finaltime of them), I'd like the 1000 elements to maintain their colors. For example, the first element in "pos" is blue throughout the simulation. The second element is red, etc.

colormap) with 1000 entries, then pick off a row / colour for each track you want to plot. - rayryengposand corresponding column oftrackto be assigned to the same colour? Basically, each row ofposandtrackhas 1000 points, where each point should be assigned a different colour. For each row that you plot, you want to make sure that the colour scheme is the same for all rows. If that's the case, then you need to plot the columns and apply the colour map accordingly. - rayryeng