Thread Subject: Arrow in plots

Subject: Arrow in plots

From: Paul

Date: 1 Nov, 2007 01:03:35

Message: 1 of 3

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);

Subject: Arrow in plots

From: TorH

Date: 1 Nov, 2007 09:02:48

Message: 2 of 3

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);

Subject: Arrow in plots

From: TorH

Date: 1 Nov, 2007 09:03:02

Message: 3 of 3

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);

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com