plot_events {ArchaeoPhases}R Documentation

Plot Events

Description

Plots credible intervals or HPD regions of a series of events.

Usage

## S4 method for signature 'MCMC,missing'
plot(
  x,
  calendar = getOption("ArchaeoPhases.calendar"),
  density = TRUE,
  interval = NULL,
  level = 0.95,
  sort = TRUE,
  decreasing = TRUE,
  main = NULL,
  sub = NULL,
  ann = graphics::par("ann"),
  axes = TRUE,
  frame.plot = FALSE,
  panel.first = NULL,
  panel.last = NULL,
  col.density = "grey",
  col.interval = "#77AADD",
  ...
)

Arguments

x

An MCMC object.

calendar

A TimeScale object specifying the target calendar (see calendar()).

density

A logical scalar: should estimated density be plotted?

interval

A character string specifying the confidence interval to be drawn. It must be one of "credible" (credible interval) or "hdr" (highest posterior density interval). Any unambiguous substring can be given. If NULL (the default) no interval is computed.

level

A length-one numeric vector giving the confidence level.

sort

A logical scalar: should the data be sorted?

decreasing

A logical scalar: should the sort order be decreasing? Only used if sort is TRUE.

main

A character string giving a main title for the plot.

sub

A character string giving a subtitle for the plot.

ann

A logical scalar: should the default annotation (title and x and y axis labels) appear on the plot?

axes

A logical scalar: should axes be drawn on the plot?

frame.plot

A logical scalar: should a box be drawn around the plot?

panel.first

An an expression to be evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids.

panel.last

An expression to be evaluated after plotting has taken place but before the axes, title and box are added.

col.density, col.interval

A specification for the plotting colors.

...

Extra parameters to be passed to stats::density().

Value

plot() is called it for its side-effects: it results in a graphic being displayed (invisibly returns x).

Author(s)

A. Philippe, M.-A. Vibet, T. S. Dye, N. Frerebeau

See Also

stats::density()

Other plot methods: plot_phases

Examples

## Coerce to MCMC
eve <- as_events(mcmc_events, calendar = CE(), iteration = 1)

## Summary
summary(eve, calendar = CE())
summary(eve, calendar = BP())

## Plot events
plot(eve, calendar = CE(), interval = "credible", level = 0.68)
plot(eve, calendar = BP(), interval = "hdr", level = 0.68)
plot(eve[, 1], interval = "hdr")

## Compute phases
pha <- phases(eve, groups = list(B = c(2, 4), A = c(1, 3)))

## Summary
summary(pha, calendar = CE())
summary(pha, calendar = BP())

## Plot phases
plot(pha, calendar = BP())
plot(pha, succession = "hiatus")
plot(pha, succession = "transition")

[Package ArchaeoPhases version 2.0 Index]