spar | R Documentation |
Set Nice Defaults for Base Graphics Parameters
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,
...
)
mar |
see |
lwd |
see |
mgp |
see |
tcl |
see |
xpd |
see |
las |
see |
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 |
mfrow |
see |
axes |
see |
cex.lab |
see |
cex.axis |
see |
... |
other parameters passed as-is to |
This function tries to set graphics::par()
to make base graphics look more publication-ready.
nothing; side effect of setting par()
Frank Harrell
## Not run:
spar(top=2, bot=1) # leave extra space for titles
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.