Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Arrow in plots
Date: Thu, 1 Nov 2007 09:02:48 +0000 (UTC)
Organization: University of Oslo
Lines: 34
Message-ID: <fgc4no$95s$1@fred.mathworks.com>
References: <fgb8l7$f1m$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1193907768 9404 172.30.248.35 (1 Nov 2007 09:02:48 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 1 Nov 2007 09:02:48 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 456791
Xref: news.mathworks.com comp.soft-sys.matlab:435586



Your code works fine for me (Matlab version 7.0 R14).

You may try:

annotation('arrow',[.39 .39],[.11 .39])
 
but then the xy-coordinates have to be specified in the
[0,1] space of the figure. To overcome this, check out
ds2nfu.m by Scott Hirsch on the file exchange.

TorH




"Paul " <par@ceri.memphis.edu> wrote in message
<fgb8l7$f1m$1@fred.mathworks.com>...
> Has anybody used 'arrow' successfully?
> 
> Try:
> 
> figure
> plot(1:10)
> arrow([4 0],[4 4])
> 
> this should draw an arrow from the x-axis to the straight
> line.  But all I get is an error: 
> 
> ??? Error using ==> and
> NaN's cannot be converted to logicals.
> 
> Error in ==> arrow at 731
> page = (~isnan(page))&(page);