plot_estimates: Plot Trend Estimates

Description Usage Arguments Value Examples

View source: R/plot-estimates.R

Description

Plots trend estimates with uncertainty if available.

Usage

1
2
3
4
5
plot_estimates(data, x, facet = NULL, nrow = NULL, ylimits = NULL,
  climits = NULL, geom = "point", low = getOption("cccharts.low"),
  mid = getOption("cccharts.mid"), high = getOption("cccharts.high"),
  insig = NULL, ybreaks = waiver(), xbreaks = waiver(),
  ylab = ylab_estimates)

Arguments

data

A data frame of the data to plot

x

A string of the column to plot on the x-axis.

facet

A string indicating the factor to facet wrap by.

nrow

A count of the number of rows when facet wrapping.

ylimits

A numeric vector of length two providing limits of the y-axis scale.

climits

A character vector of length two providing limits of the color scale.

geom

A string of the geom ("point" or "bar")

low

A string specifying the color for negative values.

mid

A string specifying the color for no change.

high

A string specifying the color for positive values.

insig

A string specifying the color for insignificant estimates.

ybreaks

A numeric vector of y-axis tick mark positions.

xbreaks

A numeric vector of x-axis tick mark positions.

ylab

A function that takes the data and returns a string for the y-axis label.

Value

A ggplot2 object.

Examples

1
2
plot_estimates(cccharts::precipitation, x = "Season",
  facet = "Ecoprovince", nrow = 2)

bcgov/cccharts documentation built on Dec. 21, 2020, 2:21 p.m.