Path: news.mathworks.com!not-for-mail
From: "us " <us@neurol.unizh.ch>
Newsgroups: comp.soft-sys.matlab
Subject: Re: help! question about plot
Date: Thu, 9 Aug 2007 23:53:28 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 17
Message-ID: <f9g9do$9j1$1@fred.mathworks.com>
References: <f9g7rs$k9f$1@fred.mathworks.com>
Reply-To: "us " <us@neurol.unizh.ch>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1186703608 9825 172.30.248.35 (9 Aug 2007 23:53:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Aug 2007 23:53:28 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:423303


Haijun Gong:
<SNIP wants to partition his/her plot

one of the copious solutions

% the data
     t=1:10; % let's be a bit more modest...
     y=rand(size(t));
     e1=1:4; % epoch 1
     e2=6:10; % epoch 2: note gap
% the engine
     line(t(e1),-1+.1*y(e1),...
         'marker','o','color',[1,0,0]);
     line(t(e2),1+2*y(e2),...
         'marker','s','color',[0,1,0]);

us