Learn R Programming

qreport (version 1.0-1)

spar: spar

Description

Set Nice Defaults for Base Graphics Parameters

Usage

spar(
  mar = if (!axes) c(2.25 + 0.6 + bot - 0.45 * multi, 2 * (las == 1) + 2.2 + left, 0.5 +
    top + 0.25 * multi, 0.5 + rt) else c(3.25 + 0.6 + bot - 0.45 * multi, 2 * (las == 1)
    + 3.7 + left, 0.5 + top + 0.25 * multi, 0.5 + rt),
  lwd = if (multi) 1 else 1.75,
  mgp = if (!axes) mgp = c(0.75, 0.1, 0) else if (multi) c(1.5 + 0.83, 0.365 - 0.03, 0)
    else c(2.4 - 0.4 + 0.83, 0.475 - 0.03, 0),
  tcl = if (multi) -0.25 else -0.4,
  xpd = FALSE,
  las = 1,
  bot = 0,
  left = 0,
  top = 0,
  rt = 0,
  ps = if (multi) 12 else 15,
  mfrow = NULL,
  axes = TRUE,
  cex.lab = 1.15,
  cex.axis = 0.8,
  ...
)

Value

nothing; side effect of setting par()

Arguments

mar

see par

lwd

see par

mgp

see par

tcl

see par

xpd

see par

las

see par

bot

additional lines of space to set aside for the bottom of the graph for extra subtitles etc.

left

additional lines to set aside at left

top

same for top

rt

same for right margin

ps

see par

mfrow

see par

axes

see par

cex.lab

see par

cex.axis

see par

...

other parameters passed as-is to graphics::par()

Author

Frank Harrell

Details

This function tries to set graphics::par() to make base graphics look more publication-ready.

Examples

Run this code
if (FALSE) {
spar(top=2, bot=1)  # leave extra space for titles
}

Run the code above in your browser using DataLab