set_mar: Set plot margins

Description Usage Arguments Details See Also Examples

View source: R/mar_and_par.R

Description

Moves axis titles and labels closer to the plotting window and shrinks the margins

Usage

1
set_mar(x = 1.8, y = 1.8, main = 1, right = 1, cex.main = 1, ...)

Arguments

x

margin width for the x axis, default 2

y

margin width for the x axis, default 2

main

margin width for the main title, default 1

right

margin width for the right edge, default 1

cex.main

The magnification to be used for main titles relative to the current setting of cex, default 1

...

further arguments passed to par

Details

Old par settings are stored in .old.par before a call to par of the form par(mar=c(x, y, main, right), mgp=c(1.9, 0.6, 0)) is made.

See Also

par

Other par_and_plot_margins_functions: default_par, revert_par

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
ymse:::.old.par
get("old.par", envir=ymse:::ymseEnv)
ls(envir=ymse:::ymseEnv)

par(col.axis=2)
plot(1:4)

set_mar()
plot(1:4)

default_par()
plot(1:4)

revert_par()
plot(1:4)

ymse:::.old.par
head(get("old.par", envir=ymse:::ymseEnv))

AkselA/R-ymse documentation built on March 21, 2020, 9:52 a.m.