Par: Set new graphical parameters

View source: R/Quartz.R

ParR Documentation

Set new graphical parameters

Description

This function sets the graphical parameters which are specified as its function arguments in a call to par. The function's default settings are set to produce visually more appealing plots compared to base R's default settings. You can change the function's defaults to your needs and/or set additional graphical parameters by passing them in tag = value form.

Usage

Par(
  mar = c(5, 5, 0.5, 0.5),
  las = 1,
  cex.axis = 1.25,
  cex.lab = 1.5,
  cex.main = 1.5,
  ...
)

Arguments

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 c(5, 5, 0.5, 0.5).

las

the style of axis labels; default is to always use horizontal axis labels (note that you then need to manually set las = 0 for the y axis titles when using mtext).

cex.axis

the magnification to be used for axis annotation relative to the current setting of cex; defaults to 1.25.

cex.lab

the magnification to be used for x and y labels relative to the current setting of cex; defaults to 1.5.

cex.main

the magnification to be used for main titles relative to the current setting of cex; defaults to 1.5.

...

further graphical parameter settings passed on to par.

Value

invisibly, the original graphical parameter settings prior to the changes from a call to Par to enable restoring the default settings; see the example.

Author(s)

Thomas Münch

See Also

par

Examples

op <- Par()
plot(1 : 10, type = "l", main = "", xlab = "X title", ylab = "Y title")
par(op)

EarthSystemDiagnostics/grfxtools documentation built on Aug. 5, 2023, 1:43 p.m.