Next: poisson() Up: MacAnova Help File Previous: paste()   Contents

# plot()

Usage:
 ```plot(x,y [,add:T,impulses:T, lines:T] [other graphics keyword phrases]), where x is a REAL vector or scalar, y is a REAL vector or matrix plot([Graph,] [x,y], keys:str), str a structure whose component names are graphics keywords ```

Keywords: plotting
```plot(x,y) makes a scatter plot of the data in vector x and vector or
matrix y using characters such as asterisks or diamonds as plotting
symbols.  If y has several columns, they are plotted with symbols
asterisk, diamond, cross, square, X, triangle, asterisk, dot, small
cross, diamond,..., thereafter cycling through the plotting symbols.

It is not an error when x or y is NULL; a warning message is printed and
no plotting occurs.

plot(x,y, symbols:c), where c is a CHARACTER or integer scalar, vector,
or matrix with ncols(c) == ncols(y), uses the elements of c as plotting
symbols as for chplot().  In particular, if c is a CHARACTER scalar
other than "###", it is used as a plotting symbol for all points (at
most first three characters).

plot(x,y,symbols:"###") labels each point with the row number when y is
a vector and with the column number when ncols(y) > 1.

plot(x,y,impulses:T [,symbols:c]) makes an "impulse" plot of y vs x,
drawing vertical lines from the x = 0 line to each point.  If y has
several columns, a different line type is used for each column.
However, since the lines will probably be superimposed, it may be hard
to interpret the resulting plot.

plot(x,y, lines:T [,impulses:T, symbols:c) does the same except the
points or impulses will be connected by lines similarly to lineplot().
You can also use keywords 'linetype' and 'thickness'.  See topic
'graph_keys'.

plot(Str [,impulses:T]), where Str is a structure with at least two REAL
components, is equivalent to plot(Str[1], Str[2] [,impulses:T]).  For
example, plot(x,y) and plot(structure(x,y)) are equivalent.  Any
components of Str beyond the first two are ignored.

plot() normally creates or replaces GRAPH variable LASTPLOT which
encapsulates everything in the graph.  In addition, if the graph was
drawn in graphics window I, GRAPHWINDOWS[I] is made identical to
LASTPLOT (I is always 1 in non-windowed DOS and Unix/Linux versions).
Saving the plot information in LASTPLOT and GRAPHWINDOWS[I] can be
suppressed by including 'keep:F' as an argument.  See topics 'graphs'
and 'graph_assign' for information on GRAPH variables and special
variable GRAPHWINDOWS.

plot(graph,x,y [,impulses:T]) or plot(graph,Str [,impulses:T]), where
graph is a GRAPH variable, draws the plot encapsulated in graph, adding
to it the new information.  See topic 'graphs' for details on adding
information to a plot.

plot(x,y [,impulses:T],add:T,...) is the same as plot(LASTPLOT,x,y
[,impulses:T],...)  drawing the graph encapsulated in LASTPLOT, adding
to it new information.  An equivalent way to do this is addpoints(x,y
[,impulses:T],...).

If option 'dumbplot' has been set False (see subtopi
'options:"dumbplot"'), the plot will be a low resolution plot unless
'dumb:F' is an argument.

See topic 'graphs' for information on how a scalar or length 2 vector x
specifies equally spaced x-values, on how to save and print plots, and
on writing graphic information to a file.

Keywords 'dumb', 'lines', 'linetype', 'thickness', 'impulse', 'xmin',
'xmax', 'ymin', 'ymax', 'logx', 'logy', 'xlab', 'ylab', 'title',
'xaxis', 'yaxis', 'borders', 'ticks', 'xticks', 'yticks', 'xticklen',
'yticklen', 'xticklabs', 'yticklabs', 'height', 'width', 'pause',
'silent' and 'notes' may be used as for other plotting commands.  See
topics 'graph_keys', 'graph_border' and 'graph_keys'

plot([Graph,] keys:structure(x:x,y:y [other keyword phrases)) is
equivalent to plot([Graph,] x:x,y:y [other keyword phrases]).  See topic
'graph_keys' for details.

See topic 'graph_assign' for information on how to plot in graphics
window I by GRAPHWINDOWS[I] <- var, where var is a structure or GRAPH
variables.

Examples:
Cmd> plot(yhat1:yhat[,1],resid1:RESIDUALS[,1],\
title:"Residuals vs yhat")

Cmd> plot(X:1,run(20)^(.2*run(5)'),ylab:"Powers of X",\
title:"X^.2, X^.4, X^.6, X^.8, and X", file:"ps.out",new:T)

Cmd> plot(X:1,run(20)^(.2*run(5)'),ylab:"Powers of X",\
title:"X^.2, X^.4, X^.6, X^.8, and X", logy:T)