plot.phenopix: Plotting 'phenopix' objects.

View source: R/plot.phenopix.R

plot.phenopixR Documentation

Plotting phenopix objects.

Description

Plotting method for objects of class phenopix

Usage

## S3 method for class 'phenopix'
plot(x, y, what, main, ...)

Arguments

x

An object of class phenopix

y

It must be NULL

what

A character vector of length 1. Available options are: all (showing both fitting curve and thresholds), fitting (showing only fitting curve) thresholds, and params to show boxplots of thresholds and curve parameters (if appropriate) when the uncertainty is computed.

main

A main title for the plot. If not specified the title will be build with fit name and threshold name.

...

For the plotting function, a number of parameters from generic plot can be specified. Note that graphic properties of fitted lines and thresholds cannot be modified. See examples.

Details

A dedicated plotting function for objects of class phenopix. The default shows observed values as a grey line, the fitted function in black and extracted thresholds in palette() colors. If available, uncertainty is also shown with a family of lightgrey curves and as error bars on the extracted thresholds.

Author(s)

Gianluca Filippa <gian.filippa@gmail.com>

Examples

## Not run: 
data(bartlett2009.filtered)
fitted <- greenProcess(bartlett2009.filtered, 'klosterman', 
  'gu', plot=FALSE, uncert=TRUE, nrep=5, ncores=2)
plot(fitted) ## default
## slightly more elaborated, with suppression of default title 
plot(fitted, type='p', pch=20, ylab='GCC', xlab='DOY', col='grey', 
  what='all', main='Fit + thresholds')
## only with the fitting curve
plot(fitted, type='p', pch=20, ylab='GCC', xlab='DOY', col='grey', 
  what='fitting', main='Fit only')
## show a boxplot of thresholds extracted from the uncertainty estimation
plot(fitted, what='thresholds')

## End(Not run)

phenopix documentation built on Aug. 9, 2023, 5:10 p.m.