plframe | 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,
plext = NULL, axcol = rep(1, 4),
plargs = NULL, ploptions = NULL, marpar = NULL, xy = NULL, ...)
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, marpar = NULL, ...)
plaxis(side, x=NULL, showlabels=TRUE, range=NULL, varlabel=NULL, col=1,
tickintervals=NULL,
plargs = NULL, ploptions = NULL, marpar = NULL, ...)
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 |
plext |
extension of the plotting area beyond the range of the data. |
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 |
marpar |
margin parameters, if already available.
By default, they will be retieved from |
xy |
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 pl.envir$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.
plaxis
only shows the variable label, tick labels and tickmarks
if there is enough space or showlabels > 1
.
If it is called when there are multiple panels, this is decided
according to the actual mar
setting if it is an inner panel;
if it is a panel adjacent to an outer margin, then the oma
setting is also used.
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
gendateaxis; pl.control
plyx(Sepal.Width ~ Sepal.Length, data=iris)
## again, each step separately
t.dt <- pl.envir$pldata
oldpar <- plframe() ## or plframe(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=pl.envir)
plsmooth() ## or plsmooth(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=pl.envir)
t.plab <- plmark(markextremes=0.03)
## or plmark(t.dt$Sepal.Length, t.dt$Sepal.Width, markextremes=0.03, plargs=pl.envir)
plpoints(plab=t.plab) ## or plpoints(t.dt$Sepal.Length, t.dt$Sepal.Width,
## plargs=pl.envir, plab=t.plab)
plaxis(4)
par(oldpar) ## reset the changed graphical parameters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.