[prog] Octave plotting points
Laurel Fan
laurel at sdf.lonestar.org
Mon May 17 15:30:26 EST 2004
On Sat, May 15, 2004 at 09:14:39PM +1000, Sue Stones wrote:
> It seems to be impossible, but does anyone know how to plot points
> in Octave (or Matlab I don't care which). I want to plot a point
> (3, 4) as x=3 and y=4. I don't want to plot 3 against its poisition
> in the vector (ie 1) and 4 against its position in the vector (ie 2)
> . I DON'T want it to interpre it as a line from (1,3) to (2, 4). I
> want to plot simple points.
Try:
plot(3, 4)
>From the help for plot:
If more than one argument is given, they are interpreted as
plot (X, Y, FMT ...)
where Y and FMT are optional, and any number of argument sets may
appear. The X and Y values are interpreted as follows:
...
If both arguments are scalars, a single point is plotted.
Also if you want multiple points:
* If both arguments are vectors, the elements of Y are plotted
versus the elements of X.
The same help file describes how to set the format to plot points
rather than lines. Let me know if you need help for that..
--
laurel at sdf.lonestar.org
http://dreadnought.gorgorg.org
More information about the Programming
mailing list