|
|
Re: Plot inside for loop..help needed!!!
Posted:
May 28, 2008 10:55 AM
|
|
Alex <mammasis82@hotmail.com> wrote in message <21707298.1211985459509.JavaMail.jakarta@nitrogen.mathforum.org>... > Hi, > > I would like to plot a figure and in my code the plot command is in a for loop. My problem is that I want to change the marker sign 'o' to an arbitrary one every time I go through the loop. In the code shown below for example, i = 1:10. I would need 10 marker signs in this case. Is this possible? > > I would appreciate anyone's help. > > for i = 1:10 > hold on > plot (x,y(i).T,'LineStyle',':',... > 'Marker','o',... > 'Color','k',... > 'MarkerSize',5) > end > hold off an idea. Store 10 markers in a cell array. eg : %CODE myMarkers={'o','+','*','s',...}%complete for i = 1:10 hold on plot (x,y(i).T,'LineStyle',':',... 'Marker',myMarkers{i},... 'Color','k',... 'MarkerSize',5) end hold off
Caroline
|
|