addErrorBars | R Documentation |
Add error bars to current plot (uses base arrows function).
addErrorBars(xpos, ypos, errorSize, arrowSize = 0.1)
xpos |
x-position of data-points |
ypos |
y-position of data-points |
errorSize |
+- size of error bars |
arrowSize |
Width of the errorbar arrow |
Plot (no return value)
# Example 1
plot(c(1, 2), c(450, 500), xlim = c(0.5, 2.5), ylim = c(400, 600), type = "o")
addErrorBars(c(1, 2), c(450, 500), errorSize = c(20, 20))
# Example 2
plot(c(1, 2), c(450, 500), xlim = c(0.5, 2.5), ylim = c(400, 600), type = "o")
addErrorBars(c(1, 2), c(450, 500), errorSize = c(20, 40), arrowSize = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.