Learn R Programming

grofit (version 1.1.1-1)

plot.gcFit: Generic plot function for gcFit objects

Description

Generic plot function for gcFit objects.

Usage

"plot"(x, opt = "m", raw = TRUE, slope = FALSE, pch = 1, colModel = 1, colSpline = 2, colData = 1, cex = 1, ...)

Arguments

x
Object of class gcFit.
opt
Character, indicating wether all available model fits ("s") or spline fits ("s") should be plotted.
raw
Logical, indicating wether the raw data should be plotted or not.
slope
Logical, indicating wether the tangent of maximal slope should be plotted or not.
pch
Numeric vector, describing plotting character used for plotting the raw data. Similar to the pch option from plot.default. The vector is recycled if the number of given data points differs from the length of the pch.
colModel
Vector, describing the color used for plotting the spline fit. Similar to the col option from plot.default. The values must be (numeric) from 0:8 or (character) an element of colors().
colSpline
Vector, describing the color used for plotting the spline fit. Similar to the col option from plot.default. The values must be (numeric) from 0:8 or (character) an element of colors().
colData
Vector, describing the color used for plotting the raw data. Similar to the col option from plot.default. The values must be (numeric) from 0:8 or (character) an element of colors(). The vector is recycled if the number of data points differ from the length of the colData.
cex
Numeric vector, describing the character expansion used for plotting the raw data. Similar to the cex option from plot.default. The vector is recycled if the number of data points differ from the length of the cex.
...
Other graphical parameters may also passed as arguments. This has currently no effect and is only meant to fulfill the requirements of a generic function.

See Also

gcFit, plot.gcFitSpline, plot.gcFitModel

Examples

Run this code
data(grofit.time)
data(grofit.data)
TestRun <- gcFit(grofit.time, grofit.data)
dev.new(width=10,height=5)
par(mfrow=c(1,2))
plot(TestRun, opt="s", pch=1:7, cex=1, colSpline=2, colData=1:7)
title("Spline fit")
plot(TestRun, opt="m", pch=1:7, cex=1, colModel=1, colData=1:7)
title("Model fit")
par(mfrow=c(1,1))

Run the code above in your browser using DataLab