Matlab gplot extra customly defined colors
1 view (last 30 days)
Show older comments
I have a question regarding Matlab's function gplot (<http://www.mathworks.nl/help/matlab/ref/gplot.html)>. I would like to call gplot several times in a for-loop to plot several graphs/paths in the same figure. However, I would like to use more colors than standardly available. With the ordinary plot command this can, for example, be done in the following way:
plot([1 2],[3 4],'Color',[rand rand rand])
But this seems not possible within gplot. Does anyone know how to do this. My code is currently:
col=char('r', 'g', 'm', 'y','r', 'g', 'm', 'y')
hold all
for i=1:k
gplot(Cell_Matrix{i},coordinates,col(i))
end
hold off
So now I have repeated using the same color (excluding some I do not want), but I would like to add way more new colors (around 25 extra).
I would really appreciate your help!
0 Comments
Answers (1)
Image Analyst
on 24 May 2013
Edited: Image Analyst
on 24 May 2013
It probably uses the standard colororder. See if changing it will help. See my demos:
0 Comments
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!