plframe {plgraphics} | R Documentation |
These functions set up the frame of a plot based on the 'pl' paradigm
plframe(x = NULL, y = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL, mar = NULL, showlabels = TRUE, plextext = NULL, axcol = rep(1, 4), plargs = NULL, ploptions = NULL, getpar = TRUE, getxy = TRUE, ...) pltitle(main=NULL, sub=NULL, csize=NULL, csizemin=NULL, side=3, line=NULL, adj=NULL, outer.margin=NULL, col="black", doc=NULL, show=NA, plargs=NULL, ploptions = NULL, ...) plaxis(side, x=NULL, showlabels=TRUE, range=NULL, varlabel=NULL, col=1, tickintervals=NULL, plargs = NULL, ploptions = NULL, getpar = TRUE, ...)
x |
coordinates for the horizontal axis |
y |
coordinates for the vertical axis |
xlab, ylab |
axis labels |
xlim, ylim |
plot ranges |
mar |
plot margins |
showlabels |
logical: should labels for tickmarks and the
variable label be displayed?
If |
plextext |
extension of the plotting area beyond the possibly already extended range. This helps to accomodate sybmbols. |
axcol |
colors for drawing axes scales |
main, sub |
main title and subtitle |
varlabel |
variable name |
side |
For |
csize |
character size. May be vector of length 3, giving size for
main title, subtitle, and |
csizemin |
minimal character size, to be used to adjust the
character size to the length of the text (if |
line |
line in margin on which the main title is placed – or the
subtitle if |
adj |
text adjustment, scalar between 0 and 1 |
outer.margin |
logical: should title text be placed in outer margin? |
col |
color for the title text or axis line and tickmarks |
range |
range in which tickmarks are set |
doc |
logical: should the |
show |
logical: if |
tickintervals |
number of intervals used by
|
plargs, ploptions |
result of |
getpar |
logical: should graphical parameters
|
getxy |
logical: should the coordinates be obtained as in
high level graphics? This is set to |
... |
absorbs extra arguments |
If the arguments x
and y
are not given,
they are obtained from .plargs$pldata
.
plframe
draws axes according to argument axes
,
by calling plaxis
.
It looks for attributes of x
and y
, such as
innerrange
and ticksat
.
Tick labels are shown at the values of the ticklabelsat
attribute if available, otherwise at the values of ticksat
.
The labels can be given by the attribute ticklabels
.
This facilitates setting more tick marks than labels, see the
example.
It also draws a grid.
The positions of gridlines at ticksat
by default.
Finally, it draws "zero" lines as determined by the pl option
zeroline
. The latter can be a numeric vector giving
the positions of such threshold lines, or a list of two such vectors,
the first for horizontal axis, the second for the vertical axis.
plargs
and ploptions
may be specified explicitly,
but they are usually generated by calling pl.control
.
plframe
and plaxis
invisibly return the former
par(c("cex", "mar", "mgp"))
if setpar
is TRUE
, otherwise NULL
.
pltitle
invisibly return a list consisting of the main
and sub
title.
Werner A. Stahel
plyx(Sepal.Width ~ Sepal.Length, data=iris) ## again, each step separately t.dt <- .plargs$pldata oldpar <- plframe() ## or plframe(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs) plsmooth() ## or plsmooth(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs) t.plab <- plmark(markextremes=0.03) ## or plmark(t.dt$Sepal.Length, t.dt$Sepal.Width, markextremes=0.03, plargs=.plargs) plpoints(plab=t.plab) ## or plpoints(t.dt$Sepal.Length, t.dt$Sepal.Width, ## plargs=.plargs, plab=t.plab) plaxis(4) par(oldpar) ## reset the changed graphical parameters