Learn R Programming

plgraphics (version 1.2)

plmarginpar: Set Graphical Parameters According to Those used in the Pl Function Called Last

Description

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

Usage

plmarginpar(plargs = pl.envir, csize = NULL)

Value

The old settings of par(c("mar","mgp")) are returned invisibly.

Arguments

plargs

list from which the margin parameters are obtained. If NULL, the default, pl.envir is used.

csize

size of plot symbols and text, changes par("cex") to csize*par("cex")

Author

Werner A. Stahel

Examples

Run this code
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")

Run the code above in your browser using DataLab