View source: R/secondary_scale.R
secondary_scale | R Documentation |
Adds a secondary scale for strat.plot
secondary_scale( x, yvar, yvar2, n = 5, xLeft = 0.11, ylabel2 = "", cex.ylabel2 = 1, cex.yaxis = 0.8 )
x |
a stratigraphic diagram object produced by strat.plot. |
yvar |
y variable. Same as main plot. |
yvar2 |
Secondary y variable |
n |
Suggested number of labels on secondary y axis. Defaults to five. |
xLeft |
Position of plot. See |
ylabel2 |
character. Label for secondary scale |
cex.ylabel2 |
numeric. Size of axis label. |
cex.yaxis |
numeric. Size of axis values. |
secondary_scale
library(rioja) data(RLGH) fos <- RLGH$spec chron <- RLGH$depths pt <- strat.plot(fos, yvar = chron$Depth, y.rev = TRUE, xLeft = .22, scale.percent = TRUE) secondary_scale(pt, yvar = chron$Depth, yvar2 = chron$Age, n = 5, ylabel2 = "Years")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.