Learn R Programming

tidypaleo (version 0.1.4)

scale_y_depth_age: Age-depth scales

Description

Age-depth scales

Usage

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(), ... )

Value

A scale_y_continuous or scale_x_continuous

Arguments

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)

Examples

Run this code
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)

Run the code above in your browser using DataLab