plot_fit: Plot Trend Observed

Description Usage Arguments Value Examples

View source: R/plot-fit.R

Description

Plots trends with observed data.

Usage

1
2
3
plot_fit(data, observed, facet = NULL, nrow = NULL, ylimits = NULL,
  ybreaks = waiver(), xbreaks = waiver(), ylab = ylab_fit,
  free_y = FALSE)

Arguments

data

A data frame of the data to plot

observed

A data.frame of the observed data.

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.

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.

free_y

A flag indicating whether the facet axis should have free_y scales.

Value

A ggplot2 object.

Examples

1
2
plot_fit(cccharts::flow_station_timing, cccharts::flow_station_timing_observed,
  facet = "Station", nrow = 2)

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