pointswithslantederror | R Documentation |
This function plots points with x- and y-errors visualised as a slanted errorbar. The length of the error bar represents x- and y-errors added in quadrature. The slope of the error bar is positive of negative depending on whether the correlation betwenn x and y is positive or negative, respectively.
pointswithslantederror(x, y, dx, dy, cor, col = "black", bcol = "black", ...)
x |
numeric vector. x-values |
y |
numeric vector. y-values |
dx |
numeric vector. x-standard errors |
dy |
numeric vector. y-standard errors |
cor |
numeric vector. Correlation coefficients between x- and y- errors. |
col |
the color of the points |
bcol |
the color of the slanted error bars |
... |
further graphical parameters to be passed on to |
plots data points with slanted error bars
x <- c(1:5) y <- x^2 dx <- c(0.1, 0.2, 0.2, 0.1, 0.05) dy <- c(0.05, 0.2, 0.1, 0.2, 0.1) cor <- c(1, -1, -1, 1, 1) plot(NA, xlim=range(x), ylim=range(y), xlab="y", ylab="y") pointswithslantederror(x=x, y=y, dx=dx, dy=dy, cor=cor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.