refLine | R Documentation |
Adds a reference line (vertical, horizontal, or regression) to a graph.
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)
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
|
current |
the current parameters of the graph. Typically, this would be
the output from one of the graph creation functions like |
xrange |
limit x-axis range for horizontal or regression lines |
yrange |
limit y-axis range for vertical lines |
log10 |
logical, if |
Information about the graph.
addXY
, addSmooth
, xyPlot
## 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") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.