Hi Ben,
Attached is the data set and a graph I have right now. The vertical lines were drawn based on the max values of each group. I did this using geom_vline(xintercept=value) but I wonder there is other way to draw x intercept and correspond the lines to each group.
My original code is
ggplot(KDTpDensity,
aes(x=Time_ms, y=FixPro, fill=AOI)) + geom_area(alpha=.3,
position="identity") +geom_vline(xintercept=1400)
+geom_vline(xintercept=1250)
To add lines, I was thinking -
1) identify max value in each group
FixPro_max<-ddply(KDTpDensity, "AOI", summarize, FixPro=max(FixPro))
2) find the corresponding x axis value
3) plot the graph based on the obtained values in 2)
I hope this makes more sense.
Thank you,