Using ggplot2
, I am trying to graph two treatments in a polar line graph. I'm able to graph the points for both treatments and get a line for the first treatment that I input, but the line that I want to connect the second subset is just overlaying over the second.
category highest lowest
1 A 71 23
2 B 81 38
3 C 77 22
4 D 83 56
5 E 84 32
6 F 82 55
7 G 73 26
So far, my code looks like this
p1<-ggplot(data=d,aes(x=factor(category),y=highest,group=1)) +
ylim(0,NA) +
geom_point(color='purple',stat='identity')+
geom_polygon(color='purple',fill=NA)+
coord_polar(start =-pi* 1/7)
p1
p1 +
geom_point(aes(x=factor(category),y=lowest),color='green',stat='identity')+
geom_polygon(color='green',fill=NA)+
coord_polar(start =-pi* 1/7)
and its looking like this
Any help? Thanks!!