On 2012-06-18 20:35, Duncan Mackay wrote:
Hi Julie
Try
strip.custom(factor.levels = paste("Treat", c("0","2","4","8","16"), sep = " ")
That won't necessarily work; it depends on what type 'Treat' is.
I suspect that it's not a factor. Here's an example using the
iris data:
First, let's augment the data with a variable 'spec' that we'll
use as a conditioning variable.
dat <- transform(iris, spec = rep(0:2, each=50))
Now compare two plots:
# Plot 1: ('spec' is not a factor)
xyplot(Sepal.Length ~ Sepal.Width | spec, data = dat,
strip = strip.custom(
factor.levels = paste(
"Treat", c("0","2","4"), sep = " ")))
# Plot 2: ('Species' is a factor)
xyplot(Sepal.Length ~ Sepal.Width | Species, data = dat,
strip = strip.custom(
factor.levels = paste(
"Treat", c("0","2","4"), sep = " ")))
Peter Ehlers
i.e
xyplot(log(pfuml)~Transfer|Treat,groups=Pop,ylab="Log10 Pfu/ml",as.table=T,
type="a",
auto.key=list(space="right",points=F,lines=T) ),
strip=strip.custom(factor.levels =
paste("Treat", c("0","2","4","8","16"), sep = " "),par.strip.text =
list(cex = 0.85) )
)
Should work but without an example ...
I have added par.strip.text in case the size is not right for you as
an example for future use
Regards
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
At 03:02 19/06/2012, you wrote:
I'm trying to create a 5-panel xyplot with each strip labelled by
treatment. The code is as follows:
xyplot(log(pfuml)~Transfer|Treat,groups=Pop,ylab="Log10 Pfu/ml",as.table=T,
type="a",
auto.key=
list(space="right",points=F,lines=T))
I've tried:
strip=strip.custom(factor.levels=c("0","2","4","8","16")
But it's not working, I still only get "Treat" printed on each
strip. Any ideas?
Thank you,
Julie
______________________________________________
R-help@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.