View source: R/ggstrat-scales.R
scale_y_depth_age | R Documentation |
Age-depth scales
scale_y_depth_age( model = NULL, age_name = "age", age_breaks = waiver(), age_labels = waiver(), ... ) scale_y_age_depth( model = NULL, reversed = FALSE, depth_name = "depth", depth_breaks = waiver(), depth_labels = waiver(), ... ) scale_x_depth_age( model = NULL, age_name = "age", age_breaks = waiver(), age_labels = waiver(), ... ) scale_x_age_depth( model = NULL, reversed = FALSE, depth_name = "depth", depth_breaks = waiver(), depth_labels = waiver(), ... )
model |
An age-depth model, or NULL to suppress the second axis |
age_name, depth_name |
Label for the second axis |
age_breaks, depth_breaks |
Breaks for the second axis |
age_labels, depth_labels |
Labels for each break on the second axis |
... |
Passed to scale_y_continuous or scale_x_continuous |
reversed |
Reverse the primary age axis (for years BP or similar) |
A scale_y_continuous or scale_x_continuous
library(ggplot2) library(dplyr, warn.conflicts = FALSE) adm <- age_depth_model( alta_lake_210Pb_ages, depth = depth_cm, age = age_year_ad ) alta_lake_geochem %>% filter(param == "Cu") %>% ggplot(aes(value, depth)) + geom_point() + scale_y_depth_age(adm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.