[R] help with plotting lines linking two sets of points?
Kristiina Hurme
kristiina.hurme at uconn.edu
Fri Apr 23 05:06:03 CEST 2010
Hello everyone,
I'm trying to plot the initial and final size of some tadpoles and look at
their growth rates (slope of line). They are divided into 6 densities, and
so far I have plotted the initial and final sizes (these are means for a
pool), and color coded for the 6 densities, but I want a line to connect the
initial and final value for each pool (also color coded by density). Any
ideas?
I'm hoping to see what the effect of density is on growth, and there are 4
replicates for each density. The initial and final sizes are staggered, 1/2
were measured at age 7.3 and 11, and the other 1/2 were measured at age 8.5
and 12.
here's a sample
pool age age2 density body_length body_length2
1 1 7.4 11.3 25 0.887 1.322550
2 2 7.4 11.3 100 0.921 1.152000
3 3 7.4 11.3 250 0.896 1.136300
4 4 7.4 11.3 75 0.723 0.955950
5 5 7.4 11.3 500 0.755 1.113300
6 6 7.4 11.3 50 0.869 1.169833
and as far as i've gotten
> plot(age,body_length,pch=as.numeric(school), col=as.numeric(density),
> xlim=c(6,13), ylim=c(0.7,1.6))
> points(age2, body_length2, pch=as.numeric(school),
> col=as.numeric(density))
http://n4.nabble.com/forum/FileDownload.jtp?type=n&id=2023096&name=Screen_shot_2010-04-22_at_11.03.08_PM.png
thanks! kristiina
--
View this message in context: http://r.789695.n4.nabble.com/help-with-plotting-lines-linking-two-sets-of-points-tp2023096p2023096.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list