Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2.glorb.com!postnews.google.com!g38g2000yqd.googlegroups.com!not-for-mail
From: "russell.fung@gmail.com" <russell.fung@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Varying point-to-point line color in plot
Date: Thu, 26 Mar 2009 11:29:49 -0700 (PDT)
Organization: http://groups.google.com
Lines: 13
Message-ID: <57ec529a-a6c7-4c75-a063-550e243bb01d@g38g2000yqd.googlegroups.com>
References: <gqdrvu$2nf$1@fred.mathworks.com>
NNTP-Posting-Host: 129.89.57.61
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1238092189 1828 127.0.0.1 (26 Mar 2009 18:29:49 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 26 Mar 2009 18:29:49 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g38g2000yqd.googlegroups.com; posting-host=129.89.57.61; 
	posting-account=40KBCAoAAACMcpWjfyXfeKnqSR9nlxRk
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; 
	rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:527997


On Mar 25, 1:09=A0pm, "Eric Brown" <eric.t.br...@gmail.com> wrote:
> I would like to add timing information to a plot with X and Y data by var=
ying the color of the line from 1:length(X). I attempted to do this with me=
shgrid and mesh, but the results were not informative.
>
> Is there an easy way to vary the point by point color of a line?
>
> I can see how to do this using 'hold' and plotting individual segments wi=
thin a loop, but it seems like there should be a better way.

Try scatter.

Russell