gggeo_scale: Add a geologic scale below ggplots using _grid_

View source: R/gggeo_scale.R

gggeo_scaleR Documentation

Add a geologic scale below ggplots using grid

Description

[Deprecated]

This function takes a ggplot object and adds a geologic time scale at the specified side using the grid and gtable packages.

If custom data is provided (with dat), it should consist of at least 3 columns of data. See data(periods) for an example.

  • The name column lists the names of each time interval. These will be used as labels if no abbreviations are provided.

  • The max_age column lists the oldest boundary of each time interval.

  • The min_age column lists the youngest boundary of each time interval.

  • The abbr column is optional and lists abbreviations that may be used as labels.

  • The color column is also optional and lists a hex color code (which can be obtained with rgb()) for each time interval.

Usage

gggeo_scale(obj, ...)

Arguments

obj

An object of class ggplot, gtable, or geo_scale (as produced by this function).

Value

A geo_scale object. Basically a gtable object but with the axis limits included.

Life cycle

This function is fully deprecated in favor of coord_geo() as of deeptime version 2.3.0. It will be removed in a future version.


deeptime documentation built on Nov. 20, 2025, 5:08 p.m.