Next: panel_graphs Up: Graphics Macros Help File Previous: panelhist()   Contents

# panelplot()

Usage:
 ```panelplot(x,y, pos:k or pos:vector(i,j), hstrips:h, vstrips:v,\ [label:structure(labx,laby)] [,graphics keyword phrases]), k, i, j, h, v > 0 integers, labx, laby CHARACTER scalars panelplot(x,y, keys:structure(keyword phrases) ```

Keywords: panel graphs
```panelplot(x,y,pos:position,hstrips:h,vstrips:v [,graphics keywords])
plots REAL vector y against REAL vector x in a pane of a "panel graph",
an h by v array of small graphs, where h and v are positive integers.
See topic 'panel_graphs' for information about such graphs.

When position is of the form vector(r, c) where 1 <= r <= h and 1 <= c
<= v are integers, the graph is drawn in the pane in row (horizontal
strip) r and column (vertical strip) c.  When position = n, with
integer n satisfying 1 <= n <= h*v, the graph is drawn in pane n,
counting across rows starting in row 1 and row 1.

When nrows(x) <= 2, x is "expanded" to a vector of equally spaced
spaced as happens with plot(), lineplot() and most other graphing
commands.  Otherwise, nrows(x) = nrows(y) is required.

panelplot() differs from plot() and most other other graphic commands,
in that y can have only one column.  Another difference is that the
graph has no tick marks or other information about actual values except
possibly the x- or y-axis.

Legal graphics keywords are 'symbols', 'add', 'window', 'show',
'title', 'xlab', 'ylab', 'xmin', 'xmax', 'ymin', 'ymax', 'xaxis',
'yaxis', 'lines', 'linetype', 'impulses' and keywords having to do with
files.  'title', 'xlab' and 'ylab' apply to the panel graph as a whole,
not to the pane being drawn.

You should use 'add:T' when drawing a pane in an existing panel graph.

If you use 'symbols', you should probably choose small symbols, ASCII
codes 7 and 9 - 24 ("\7" and "\11" - "\30" or "\07" and "\x09\ -
"\x18".  The default is symbols:"\7" (dot) except with lines:T, when
the default is "".

You may not use graphics keywords 'logx', 'logy' or any keywords
having to do with tick marks.

panelplot(x,y,pos:position,hstrips:h,vstrips:v,labels:vector(labsx,
labsy) [,graphics keywords]), where labsx and labsy are CHARACTER
scalars, allows you interactively to position a label of the form
paste(labsy,"vs",labsx) on the graph.  'labels' is ignored with keyword
phrase 'nolabels:F' or graphics keyword phrase 'show:F'.

Example:
Cmd> irisdata <- matread("macanova.dat","irisdata") #Fisher data

Cmd> # col 1 is variety number, 2 - 5 are data

Cmd> colnames <- vector("SepLen","SepWid","PetLen","PetWid")

Cmd> first <- T;for (i,1,4){
for (j,1,4) {
if (i != j) {
panelplot(y[,i],y[,j], pos:vector(i,j),hstrips:4,vstrips:4,\
title:"Scatter plot matrix of Fisher Iris data",\
symbols:vector("\21","\22","\23")[irisdata[,1]],\
first <- F
}
}
}

Cmd> showplot()

This plots every column of the Fisher iris data against every other in
a 4 by 4 panel graph similar to that produced by plotmatrix().