Path: news.mathworks.com!not-for-mail
From: "Wu Zhiyong" <wuzhiyong_163@163.com>
Newsgroups: comp.soft-sys.matlab
Subject: plotyy&annotating
Date: Sat, 19 Apr 2008 08:13:02 +0000 (UTC)
Organization: Sun-Yatsen University
Lines: 22
Message-ID: <fuc9ie$qp7$1@fred.mathworks.com>
Reply-To: "Wu Zhiyong" <wuzhiyong_163@163.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1208592782 27431 172.30.248.35 (19 Apr 2008 08:13:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 19 Apr 2008 08:13:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1292814
Xref: news.mathworks.com comp.soft-sys.matlab:464008


well,the data are as followed:
[x,y1],[x,y2],[x,y3];
I want to plot three lines. plot y1,y2 for the left 
axes,and plot y3 for the right axes.
It seams that we can just plot 2 lines with the 
function "plotyy".
I add another "plot",but I failed to annotate the figure.
my code are as followed:

[Ax,H1,H2]=plotyy(x,y1,x,y3);
hold on
H3=plot(x,y2);
set(gca,'XTick',[0 3 6 9 12 15 18],'XTicklabel',[08 11 14 
17 20 23 02]) 
legend('modis','usgs','diff')

I can't get the right legend and XTicklabel.

Do you have any good ideal?
any suggestion is appreciated!
Thanks!