Reputation: 705
I know there's a lot of question about this topic, but i can't find the answer i need. Years ago i used R, now i can't remember anything, but i'm sure is possible to draw a chart like this, with confidence intervals for every single points, and the main line between points (like in the screenshot). I already have all datas i need, pre calculated with spreadsheet. A simple example:
I need the syntax to draw a chart like this:
Upvotes: 1
Views: 8235
Reputation: 28379
Use ggplot2
for easy and quick plotting.
data <- data.frame(distance = c(10, 20, 30),
value = c(4, 5, 6),
CI = c(0.2, 0.5, 0.9))
library(ggplot2)
ggplot(data, aes(distance, value)) +
geom_point() +
geom_line() +
geom_errorbar(aes(ymin = value - CI, ymax = value + CI)) +
labs(x = "DISTANCE",
y = "VALUES",
title = "MY TITLE") +
theme_classic()
Upvotes: 7