addfiglabel | R Documentation |
add an identifier to subpanels in a plot
addfiglabel(lab, xloc = -1, yloc = 1, ...)
lab |
character, the text to appear (e.g. "(a)") |
xloc |
numeric, the location of the text along the x-axis (default: -1) |
yloc |
numeric, the location of the text along the y-axis (default: 1) |
... |
additional parameters passed on the |
the function produces a new plot on top of the current one, albeit without axes and annotations (think of a new 'layer'). The text is then written according to the coordinates passed on, which by default places the text label in the top left corner.
a plot
par(mfcol = c(2, 2)) plot(1:10) addfiglabel("(a)") plot(1:10) addfiglabel("(b)", cex = 0.5, col = "red") par(mar = c(2,2,2,2)) plot(1:10) addfiglabel("(c)") plot(1:10) addfiglabel("(d)", cex = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.