persp.setup(lty=<<see below>>, col=<<see below>>, lwd=<<see below>>,
all=<<see below>>, restore=F)
all are not given and
restore is
FALSE, then the
value is not changed.
all are not given and
restore is
FALSE, then the
value is not changed.
0 means to not draw a class of lines.
If this argument and
all are not given and
restore is
FALSE, then the
value is not changed.
persp.setup.
This must have the three components
lty,
col, and
lwd.
This argument is ignored if
restore is
TRUE.
TRUE, the values are restored to their initial values.
These values are
c(1,1,1) for
lty and
col, and
c(1,0,1) for
lwd.
lty,
col, and
lwd containing
the previous settings of these line style parameters.
persp will use these line styles.
The
persp function will draw a perspective plot of a surface, z(x,y),
with the top, bottom, and hidden parts drawn in contrasting
styles.
By default, the hidden lines are not drawn, and the
lines on the top and bottom of the surface are the same width.
persp.setup
allows you to change these defaults.
x <- seq(0, 3*pi, by=.2) y <- seq(3, 0, by=-.2) z <- outer(cos(x), exp(-y), "*") # make lines on the top color 1 and lines on the bottom color 2 # the hidden lines will not be drawn. persp.setup(lty=c(1,1,1), col=c(1,1,2), lwd=c(1,0,1)) persp(z) # hidden lines with a dotted pattern # the visible lines on the top thicker, all in one color persp.setup(lty=c(1,2,1), col=c(1,1,1), lwd=c(2,1,1)) persp(z) # look at the current values for the line styles print(persp.setup()) ps.old <- persp.setup(col=1:3) persp(z) persp.setup(all=ps.old) # change back to ps.old values