baytrends (version 1.1.0)

refLine: Reference Line

Description

Adds a reference line (vertical, horizontal, or regression) to a graph.

Usage

refLine(horizontal, vertical, coefficients, Plot = list(name = "", what =
  "lines", type = "solid", width = "standard", symbol = "circle", filled =
  TRUE, size = 0.09, color = "black"), current = list(yaxis.log = FALSE,
  yaxis.rev = FALSE, xaxis.log = FALSE), xrange = c(NA, NA),
  yrange = c(NA, NA), log10 = FALSE)

Arguments

horizontal

draw horizontal lines at the specified values.

vertical

draw vertical lines at the specified values.

coefficients

draw a fitted line from the coefficients of a regression model.

Plot

parameters defining the characteristics of the plot. See setPlot for a description of the parameters. The argument what is forced to "lines."

current

the current parameters of the graph. Typically, this would be the output from one of the graph creation functions like xyPlot.

xrange

limit x-axis range for horizontal or regression lines

yrange

limit y-axis range for vertical lines

log10

logical, if TRUE, then log base 10 transform used in the regression model, otherwise either the natural log was used or no transform.

Value

Information about the graph.

Details

Added from smwrGraphs.

Examples

Run this code
# NOT RUN {
set.seed(1)
X <- rnorm(32)
Y <- X + rnorm(32)
setGD()
xyPlot(X, Y)
# Add the 1:1 line
refLine(coefficient=c(0,1))
# For more details of refLine see
vignette(topic="GraphAdditions", package="smwrGraphs")
demo(topic="Coplot-complexScatterPlot", package="smwrGraphs")
# }

Run the code above in your browser using DataLab