Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Plot inside for loop..help needed!!!
Replies: 10   Last Post: Aug 29, 2013 7:15 AM

 Messages: [ Previous | Next ]
 Derek Goring Posts: 3,922 Registered: 12/7/04
Re: Plot inside for loop..help needed!!!
Posted: Dec 6, 2012 8:20 PM

On Friday, December 7, 2012 11:29:02 AM UTC+13, vince....@gmail.com wrote:
> On Wednesday, May 28, 2008 4:37:08 PM UTC+2, Alex wrote:
>

> > 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
>
>
>
> Hi,
>
> I'm using a similar idea to change colors, but I want everything to be plotted as a scatter plot of 'o' markers.
>
> My issue is, when I implement this in a for loop as follows:
>
>
>
> color = {'k','b','r','g','y','c',[.5 .6 .7],[.8 .2 .6]}
>
>
>
> for i = 1:8
>
> plot(x{:,i},y{:,i},'Color',color{i},'Marker','o')
>
> end
>
>
>
> The plot returned consists of lines with the 'o' marker on top. I really only want the markers, how do I remove the line?