plotTimeseriesEnsRibbons: Plot an ensemble timeseries as ribbons of probabilities

View source: R/plotting.geoChronR.R

plotTimeseriesEnsRibbonsR Documentation

Plot an ensemble timeseries as ribbons of probabilities

Description

Plot an ensemble timeseries as a set of bands of probability. Useful for displaying the full range of probability across ensemble members.

Usage

plotTimeseriesEnsRibbons(
  add.to.plot = ggplot(),
  X,
  Y,
  alp = 1,
  probs = c(0.025, 0.25, 0.5, 0.75, 0.975),
  x.bin = NA,
  y.bin = NA,
  n.bins = 200,
  color.low = "white",
  color.high = "grey70",
  color.line = "Black",
  color.vector = NA,
  line.width = 1,
  export.quantiles = FALSE,
  ...
)

Arguments

add.to.plot

A ggplot object to add this plot to. Default is ggplot() .

X

A LiPD variable list to plot, including values, units, names, and more

Y

A LiPD variable list to plot, including values, units, names, and more

alp

alpha (transparency) parameter for the ribbons

probs

a vector of probabilities to plot as ribbons. It will create bands as ribbons of quantiles moving inward. If there's an odd number, it plots the middle quantile as a line.

x.bin

vector of bin edges over which to bin.

y.bin

vector of bin edges over which to bin.

n.bins

number bins over which to calculate intervals. Used to calculate x.bin if not provided.

color.low

Color of the outermost band; the extreme quantiles of the distribution

color.high

Color of the innermost band; the central quantiles of the distribution

color.line

Line color (following ggplot rules)

color.vector

A vector (of length equal to the number of bands) that specifies the colors for the ribbons from the outermost band in (default = NA). Colors specified as string according to ggplot2 conventions. If present, this overrules color.high and color.low

line.width

Width of the line

export.quantiles

If TRUE, return the plotted quantiles rather than the plot

...

Arguments passed on to quantile2d

x

n by m matrix where n is the number of observations and m is >= 1

y

n by j matrix where n is the number of observations and j is >= 1

seed

set a seed for reproducibility

n.ens

how many ensemble members?

limit.outliers.x

limit the plotting of outliers on the x axis to exclude values below this probability limit (default = 0.025)

Value

A ggplot object OR list of plotted quantiles, depending on export.quantiles

Author(s)

Nick McKay

See Also

Other plot: plotChron(), plotChronEns(), plotChronEnsDiff(), plotCorEns(), plotHistEns(), plotLine(), plotModelDistributions(), plotPcaEns(), plotPvalsEnsFdr(), plotRegressEns(), plotScatterEns(), plotScreeEns(), plotSpectraEns(), plotSpectrum(), plotSummary(), plotSummaryTs(), plotTimeseriesEnsLines(), plotTimeseriesStack(), plotTrendLinesEns()


nickmckay/GeoChronR documentation built on April 9, 2024, 5:26 a.m.