Thank you! It is always so simple...

May I throw another question at you? In useOuterStrips, in the latticeExtra
package, I am having problems calling custom strip names, e.g.

useOuterStrips(xyplot(y-x | LOCATION + EVENT, data = TC6, groups = TYPE),
strip=strip.custom(factor.
levels = c("Left", "Middle", "Right 1","Right 2"), bg="snow3"),
strip.left=strip.custom(factor.levels = c("October 2009", "April 2010",
"June 2010"),bg="snow2")

Strip names should be location and strip.left should be event. For some
reason the factor.levels labels just aren't printing. It just says "EVENT."
strip works just fine.




On Wed, Sep 1, 2010 at 12:45 PM, Deepayan Sarkar [via R] <
ml-node+2413989-1836328520-57...@n4.nabble.com<ml-node%2b2413989-1836328520-57...@n4.nabble.com>
> wrote:

> On Wed, Sep 1, 2010 at 9:00 AM, jrflanders <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=2413989&i=0>>
> wrote:
> >
> > Dear R users,
> >
> > I would like one of my groups in xyplot to appear to lie 'behind' the
> other
> > groups. I have searched for help and find many, many topics about panel
> > order (e.g., "as.table"), but that is not what I need.
> >
> > What is odd is that the group that I want to appear 'behind' the others
> > (PROFILE) is the last in alphabetical order but xyplot is plotting it
> first.
>
> Yes, the default order is alphabetical order (see ?factor). That group
> is the last group, so is plotted last, and so appears on top.
>
> > Any ideas?
>
> You simply need to make it the first group, using something like
>
> factor(TYPE, levels = ...)
>
> -Deepayan
>
>
> > Code:
> > xyplot(Z_m~TEMP_C | LOCATION + EVENT, data = TC6,
> >        groups = TYPE,
> >        aspect = 2,
> >        as.table = TRUE,
> >        ylim = c(120,0),
> >        between = list(y=2),
> >        lty = 0,
> >        strip = FALSE,
> >        type = "o",
> >        jitter.x = TRUE, jitter.y = TRUE,
> >        pch = c(4,6,17,6,16), col.symbol =
> > c("grey","blue","black","red","black"), cex = 1.2,
> >        ylab = "Depth (m)",
> >        xlab = expression(Temperature~"("~degree*C~")"),
> >        scales = list(
> >                y=list(at=seq(0,120,20), limits = c(120,0), cex = 1.2),
> >                x=list(at=seq(3,18,3), alternating = c(2,1), limits =
> > c(3,18), cex = 1.2)))
> >
> > Example data:
> > EVENT, TRANSECT, LOC_CODE, TYPE, TEMP_C, Z_m
> > 3 TC6 D MAX        15.6 1.2
> > 3 TC6 D MEAN 14.8 1.1
> > 3 TC6 D MIN        14.4 1.0
> > 3 TC6 D POINT 11.3 55.8
> > 3 TC6 D POINT 11.3 58.3
> > 3 TC6 D POINT 11.3 58.3
> > 3 TC6 D PROFILE 16.0 3.3
> > 3 TC6 D PROFILE 16.0 3.2
> > 3 TC6 D PROFILE 15.2 8.9
> > 3 TC6 D PROFILE 12.6 14.8
> > 3 TC6 D PROFILE 12.5 14.8
> > 3 TC6 D PROFILE 11.6 21.2
> > 3 TC6 D PROFILE 11.5 26.9
> > 3 TC6 D PROFILE 11.4 33.3
> > 3 TC6 D PROFILE 11.4 39.5
> > 3 TC6 D PROFILE 11.3 45.4
> > 3 TC6 D PROFILE 11.3 50.2
> > 3 TC6 D PROFILE 11.3 54.1
> > 3 TC6 D PROFILE 11.3 53.5
> > --
> > View this message in context:
> http://r.789695.n4.nabble.com/xyplot-Lattice-Group-order-in-display-tp2403483p2403483.html<http://r.789695.n4.nabble.com/xyplot-Lattice-Group-order-in-display-tp2403483p2403483.html?by-user=t>
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > [hidden email] 
> > <http://user/SendEmail.jtp?type=node&node=2413989&i=1>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.
> >
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=2413989&i=2>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.
>
>
> ------------------------------
>  View message @
> http://r.789695.n4.nabble.com/xyplot-Lattice-Group-order-in-display-tp2403483p2413989.html
> To unsubscribe from xyplot (Lattice): Group order in display, click 
> here<http://r.789695.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=2403483&code=anJmbGFuZGVyc0BnbWFpbC5jb218MjQwMzQ4M3w2NjU1NDI1NDI=>.
>
>
>

-- 
View this message in context: 
http://r.789695.n4.nabble.com/xyplot-Lattice-Group-order-in-display-tp2403483p2415419.html
Sent from the R help mailing list archive at Nabble.com.

        [[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