Hello R Folks...

Using the example below, I¹d like two of the panels to be plotted with type
= ³p² but the third to be done with type = ³h².  I can¹t use type = c(³p²,
³p², ³h²) because this syntax applies all given types to every panel.  I
don¹t think I can use groups and distribute.type because these are intended
for different styles of plotting within a single panel.  As you can see, I
tried to do a panel function following something I saw in the Lattice book,
but this has no effect at all.  Looks like it may have to be more elaborate,
but I¹m stuck.  Any suggestions appreciated!

Thanks, Bryan
*************
Bryan Hanson
Professor of Chemistry & Biochemistry
DePauw University, Greencastle IN USA


y <- rnorm(100)
x <- rnorm(100)
names <- rep(c("Set 1", "Set 2", "Set 3"), 4)
df <- data.frame(y = y, x = y, names = as.factor(names))
p <- xyplot(y ~ x | names,
    layout = c(1, 3),
    panel = function(...) {
        panel.xyplot(...)
        if (panel.number() == 1) type = "h"
        })

plot(p)

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to