x4 <- c(330, 835, 317, 396, 486, 391)y4 <- c(4098.11, 4099.14,
4098.16, 4098.35, 4099.30, 4096.73)y4b <- c(0.47, 0.29, 0.46, 0.83,
0.72, 0.87)y4min<-y4-y4by4max<-y4+y4b
dat.tgg817a <- data.frame(x4, y4, y4b,y4max, y4min)
t4 <- sum(y4/y4b)/(sum(1/y4b))
x5 <- c(721, 257, 204, 271)y5 <- c(4096.33, 4095.51, 4095.29,
4095.19)y5b <- c(0.10, 0.15, 0.18, 0.22)y5min<-y5-y5by5max<-y5+y5b
dat.tgg817b <- data.frame(x5, y5, y5b, y5max, y5min)
t5 <- sum(y5/y5b)/(sum(1/y5b))
ggplot()+geom_point(data=dat.tgg817a, aes(x=x4,
y=y4))+geom_errorbar(data=dat.tgg817a, aes(x=x4, y=y4, ymin= y4min,
ymax= y4max), width = 3,
colour='NavyBlue')+geom_hline(aes(yintercept=t4), colour ='NavyBlue',
size=2)+geom_point(data=dat.tgg817b, aes(x=x5, y=y5),
colour='DarkRed') + geom_hline(aes(yintercept=t5), colour ='DarkRed',
size=2) + geom_errorbar(data=dat.tgg817b, aes(x=x5, y=y5, ymin= y5min,
ymax= y5max), width = 3,
colour='DarkRed')+coord_cartesian(ylim=c(4094,4101), wise=TRUE)
x4 <- c(330, 835, 317, 396, 486, 391) y4 <- c(4098.11, 4099.14, 4098.16, 4098.35, 4099.30, 4096.73) y4b <- c(0.47, 0.29, 0.46, 0.83, 0.72, 0.87) y4min<-y4-y4b y4max<-y4+y4b dat.tgg817a <- data.frame(x4, y4, y4b,y4max, y4min) t4 <- sum(y4/y4b)/(sum(1/y4b))
x5 <- c(721, 257, 204, 271)
y5 <- c(4096.33, 4095.51, 4095.29, 4095.19) y5b <- c(0.10, 0.15, 0.18, 0.22)
y5min<-y5-y5b y5max<-y5+y5b dat.tgg817b <- data.frame(x5, y5, y5b, y5max, y5min)
t5 <- sum(y5/y5b)/(sum(1/y5b)) ggplot()+ geom_point(data=dat.tgg817a, aes(x=x4, y=y4))+ geom_errorbar(data=dat.tgg817a, aes(x=x4, y=y4, ymin= y4min, ymax= y4max), width = 3, colour='NavyBlue')+ geom_hline(aes(yintercept=t4), colour ='NavyBlue', size=2)+ geom_point(data=dat.tgg817b, aes(x=x5, y=y5), colour='DarkRed')+ geom_hline(aes(yintercept=t5), colour ='DarkRed', size=2)+ geom_errorbar(data=dat.tgg817b, aes(x=x5, y=y5, ymin= y5min, ymax= y5max), width = 3, colour='DarkRed')+ coord_cartesian(ylim=c(4094,4101), wise=TRUE)
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2