plmarginpar | R Documentation |
plmarginpar
calls par
to set the margin widths
mar
and mgp
equal to those used in the last call of a
high level pl function
plmarginpar(plargs = pl.envir, csize = NULL)
plargs |
list from which the margin parameters are obtained.
If |
csize |
size of plot symbols and text, changes |
The old settings of par(c("mar","mgp"))
are returned
invisibly.
plmarginpar
is used to complement a plot with
low level ordinary R functions like mtext
or
segments
, see Example.
The same effect can be achieved by setting the pl option
keeppar
to TRUE
, either by calling ploptions
or by setting keeppar=TRUE
in the call to the high level
pl function.
Werner A. Stahel
par(mar=c(2,2,5,2))
plyx(Sepal.Width~Sepal.Length, data=iris) ## margins according to ploptions
par("mar") ## paramteres have been recovered
mtext("wrong place for text",3,1, col="red") ## margins not appropriate for active plot
plmarginpar()
par("mar") ## margins used inside the call to plyx . These are now active
mtext("here is the right place",3,1, col="blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.