Unable to obtain the line chart with error envelop in ggplot2 and geom_ribbon()
0
0
Entering edit mode
@mohammedtoufiq91-17679
Last seen 7 weeks ago
United States

Hi,

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:

library(ggplot2)

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, ")") ))) + 
ylab("Neg_Dct")

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

Output: https://imgur.com/vGwKMqG

ggplot2 line chart R geom_ribbon() • 696 views
ADD COMMENT

Login before adding your answer.

Traffic: 686 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6