I am NOT plotting from the actual data, I only have a data.frame that list the x, y values as well as the upper and lower confident intervals. I want to plot line graph with con
You're looking for geom_ribbon. Calling your data frame df:
geom_ribbon
df
ggplot(df, aes(x = x, y = y, group = factor(grp), color = factor(grp), fill = factor(grp))) + geom_ribbon(aes(ymax = conf.high, ymin = conf.low), alpha = 0.2) + geom_line()
It will be a little cleaner if grp is already a factor.
grp