plframe {plgraphics} | R Documentation |
These functions set up the frame of a plot based on the 'pl' paradigm
plframe(x, y, xlab = NULL, ylab = NULL, ticklabels = TRUE, plextext = NULL, axcol = rep(1, 4), mar = NULL, plargs = NULL, ploptions = NULL, setpar = TRUE) pltitle(main=NULL, sub=NULL, cex=NULL, cexmin=NULL, side=3, line=NULL, adj=NULL, outer.margin=NULL, col="black", doc=NULL, show=TRUE, plargs=NULL, ploptions = NULL, ...) plaxis(side, x, lab=TRUE, range=NULL, varlabel=NULL, col=1, tickintervals=NULL, plargs = NULL, ploptions = NULL, setpar = TRUE, ...)
x |
coordinates for the horizontal axis |
y |
coordinates for the vertical axis |
axcol |
colors for drawing axes scales |
mar |
plot margins |
xlab, ylab |
axis labels |
main, sub |
main title and subtitle |
varlabel |
variable name |
plextext |
extension of the plotting area beyond the possibly already extended range. This helps to accomodate sybmbols. |
ticklabels |
logical: should tick labels be shown? |
side |
For |
cex |
character size. May be vector of length 3, giving size for
main title, subtitle, and |
cexmin |
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 |
lab |
logical: should labels for tickmarks be displayed? |
range |
range in which tickmarks are set |
doc |
logical: should the |
show |
logical: if |
tickintervals |
number of intervals used by
|
plargs, ploptions |
result of |
setpar |
logical: should graphical parameters
|
... |
absorbs extra arguments |
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
.
Werner A. Stahel
plyx(Sepal.Width ~ Sepal.Length, data=iris) ## again, each step separately t.dt <- .plargs$pldata ploptions(grid=TRUE) oldpar <- plframe(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs) plsmooth(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs) t.plab <- plmark(t.dt$Sepal.Length, t.dt$Sepal.Width, markextremes=0.03, plargs=.plargs) plpoints(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs, plab=t.plab) par(oldpar) ## reset the changed graphical parameters