Description Usage Arguments Value Author(s) See Also Examples
View source: R/paper-plotting-functions.R
This function returns a list of default plotting parameters specified as its
function arguments, which can then be set via a call to
par
. Additional parameters can be specified via ...
. This
wrapper function provides a convenient way to set new graphics parameters
and save their old values for later restoring at the same time; see the
example.
1 2 3 4 5 6 7 8 | SetPlotPar(
mar = c(5, 5, 0.5, 0.5),
las = 1,
cex.main = 1.5,
cex.lab = 1.5,
cex.axis = 1.25,
...
)
|
mar |
a numerical vector of the form ‘c(bottom, left, top, right)’ which
gives the number of lines of margin to be specified on the four sides of
the plot. The default is |
las |
the style of axis labels; default is to always use horizontal axis
labels (note that you then need to manually set |
cex.main |
the magnification to be used for main titles relative to the
current setting of |
cex.lab |
the magnification to be used for x and y labels relative to the
current setting of |
cex.axis |
the magnification to be used for axis annotation relative to
the current setting of |
... |
further graphical parameter settings passed on to
|
A list of plotting parameters to be used with par()
.
mar = c(5, 5, 0.5, 0.5)
las = 1
cex.main = 1.5
cex.lab = 1.5
cex.axis = 1.25
...
Thomas Münch
1 2 3 4 5 6 7 8 9 | # Default settings
op <- par(proxysnr:::SetPlotPar())
plot(1 : 10, xlab = "X title", ylab = "Y title", type = "l")
par(op)
# Change default line width and increase outer margin
op <- par(proxysnr:::SetPlotPar(lwd = 2, oma = c(2, 2, 2, 2)))
plot(1 : 10, xlab = "X title", ylab = "Y title", type = "l")
par(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.