help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plotting a line


From: Miquel E. Cabañas
Subject: Re: Plotting a line
Date: Mon, 19 Feb 2007 15:17:29 +0100 (CET)
User-agent: SquirrelMail/1.4.4

there's no problem, it's a feature ;-)

> If i want to plot a line between two points I use the
> command plot([x1,x2],[y1,y1])  [...]  if the points are
> x1=1, y1=2 and x2=1, y2=1 (vertical line) a warning appears:
> empty x range [1:1], adjusting to [0.99:1.01]
> What is the problem. Exists any command to plot a line
> between two points.

the warning message simply informs you that the program has noticed that
the largest and smallest x values are the same, which results in an "empty
x range" (x axis of zero length), accordingly it has slightly readjusted
the edge values of the range so that it can plot an x axis of finite
length.

You can avoid this warning message by manually setting the x-axis limit
values, for instance, try,

> axis ([-1, 1)
> plot ([1,1], [2,1])

See "help axis" for further details.

Miquel

-- 
Miquel Cabañas, SeRMN, UAB
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]