Question: Unable to obtain the line chart with error envelop in ggplot2 and geom_ribbon()
gravatar for mohammedtoufiq91
6 weeks ago by
mohammedtoufiq910 wrote:


I have a data file with three columns "Timepoints" "values" and "TimepointDescriptive". I am interested to obtain the curve line graph with the ribbons as described here. Line chart with error envelop: ggplot2 and geomribbon(). However, I do not see this pattern. Please assist me with this. I have attached the image in the link below:


Neg_DCt <- read.csv(file ="./CurvePlot/Test_data.csv", stringsAsFactors = FALSE)

Neg_DCt$Timepoints <- as.numeric(as.character(Neg_DCt$Timepoints))

ggplot(data=Neg_DCt, aes(x=Neg_DCt$Timepoints, y=Neg_DCt$values, ymin=1.890175, ymax=8.49815, fill=Neg_DCt$Timepoint_Descriptive, linetype=Neg_DCt$Timepoint_Descriptive)) + 
geom_line() + 
 geom_ribbon(alpha=0.5) + 
scale_x_log10() + 
scale_y_log10() +
xlab(as.expression(expression( paste("Timepoints (", T, ")") ))) + 

Data file:

Timepoints  values  Timepoint_Descriptive
1   8.49815 1A
2   5.58935 2A
3   4.6713  3A
1   7.22285 1A
2   7.23855 2A
3   6.21435 3A
1   5.51335 1A
2   5.138025    2A
3   1.890175    3A


ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by mohammedtoufiq910
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 300 users visited in the last hour