Re: [R] Adding annotations to qplot from a data frame

2012-09-16 Thread Euan Reavie
Thank you for the many replies on this issue. I turns out qplot is not suited to multiple annotations, so the best suggestions were to use ggplot. The following worked for making an annotated stacked bar plot: ggplot(algaedata) + geom_bar(aes(x = year, y = cellsperml, colour = DIV, group = DIV

[R] Adding annotations to qplot from a data frame

2012-09-13 Thread Euan Reavie
I have the following data frame: > algaedata = year DIV cellsperml 2001 BAC 72.808 2001 CHL 3.273 2002 BAC 14.002 2002 CYA 220.896 2002 UNI 464.699 2003 BAP 0 2003 BAC 1.782 2004 CYA 315.799 2005 UNI 222.532 2005 BAP 0.2 2005 CYA 163.627 2005 BAC 324.949 2006 CHL 1.636 2006 BAC 199.145 2007 CHL 19.