I want to use a loop to plot a series of datasets eg
for jj=1:numel(data)
plot(data{jj}(:,1),data{jj}(:,2),[Marker Color])
end
I'd like to know if there is a built-in function that I could use in my plot command so that Color and Marker are automatically incremented and that at the end of the day each dataset has a different marker/color.
I could do this
markers = {'+','o','*','.','x','s','d','^','v','>','<','p','h'}
and then access it this way:
markers{mod(i,numel(markers))+1}
and something similar for the colors but it's kind of ugly
any comments ?
1 Comment
Ali (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/49062-is-it-possible-to-increment-color-and-markers-automatically-for-a-plot-in-a-loop#comment_498520
Sign in to comment.