This function takes a ggplot object and adds a geologic time scale at the specified side.
gggeo_scale_old(
gg,
dat = "periods",
fill = NULL,
color = "black",
alpha = 1,
height = 0.05,
gap = 0,
pos = "bottom",
lab = TRUE,
rot = 0,
abbrv = TRUE,
skip = c("Quaternary", "Holocene", "Late Pleistocene"),
size = 5,
neg = FALSE
)
A ggplot object.
The ggplot object.
Either A) a string indicating a built-in dataframe with interval data from the ICS ("periods", "epochs", "stages", "eons", or "eras"), B) a string indicating a timescale from macrostrat (see list here: https://macrostrat.org/api/defs/timescales?all), or C) a custom dataframe of time interval boundaries (see Details).
The fill color of the boxes. The default is to use the colors
included in dat
. If a custom dataset is provided with dat
without color
and without fill, a greyscale will be used. Custom fill colors can be
provided with this option and will be recycled if/as necessary.
The outline color of the interval boxes.
The transparency of the fill colors.
The proportional height (or width if pos
is left
or
right
) of the entire plot to use for the scale.
The proportional height (or width) of the entire plot to use as a gap between the axis and the scale.
Which side to add the scale to (left, right, top, or bottom). First letter may also be used.
Whether to include labels.
The amount of counter-clockwise rotation to add to the labels (in degrees).
If including labels, whether to use abbreviations instead of full interval names.
A vector of interval names indicating which intervals should not be labeled.
Label size.
Set this to true if your x-axis is using negative values.
This function is fully deprecated in favor of coord_geo()
as of
deeptime version 1.2.0. It will be removed in a future version.
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.