[R] Adding text to strip in xYplot

From: John Poulsen <jpoulsen_at_zoo.ufl.edu>
Date: Wed, 09 Apr 2008 08:39:09 -0400

Hello again,

I have been trying to add an expression to the strips in xYplot to no avail. For example, in the code below, the text in the strips for each panel is "Anls" and "Plts". However, I would like it to add "Anls km^2" and "Plants km^2" with the exponents raised.

I tried resetting the name of my groups in the dataframe before plotting, but the dataframe only recognized the entire expression (e.g. expression(paste("Anls", km^2,sep=" ")) and not Anls km2 - which should not have surprised me.

Any ideas? Thanks for any help you can provide.




grp=rep(c("Anls","Plts"),each=length(x1))) dat=as.data.frame(cbind(ycomb, y.up, y.low, rep(x1,2)),stringsAsFactors=F) colnames(dat)=c("ycomb","y.up","y.low","x1")

with(dat,xYplot(Cbind(ycomb, y.up, y.low)~x1|factor(grp), data=dat,type="l", method="bands", scales=list(y=list(relation="free"),


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 09 Apr 2008 - 12:46:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Apr 2008 - 17:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive