Hello,
I have a code that loops through a dataset of current velocity profiles through the water column, and can't figure out how to change the color of the plotted line with each iteration. Here is the code as is:
figureset(gcf, 'Position', get(0, 'Screensize'));for fig=1:length(ur10) plot(ur10(:,fig),z) hold on xlim([-1.8 2.2]) title('velocity profiles at low discharge','FontSize',17) xlabel('velocity, positive landward (m/s)','FontSize',17) ylabel('meters above bed','FontSize',17) pause(.01)end
I would like to be able to have each successive velocity profile plot in orange, but all those that have already plotted to remain on the figure in blue. This way I can see all the previous profiles but also differentiate the most recent one that plots for each loop iteration. Can someone assist? Thank you!
Best Answer