> "To do that effectively with lattice graphics you have to learn how to write > panel functions"
There is an alternative mechanism that is usually easier. The latticeExtra layering functions, due to Felix Andrews, overlay (or underlay) onto an existing trellis object. The relevant functions are layer(), layer_(), glayer() (where there are groups), glayer_(), and as.layer(). The as.layer() function turns a trellis object into a layer that can then be ‘added' onto another object. The drawLayer() function provides a more interactive mechanism for achieving the same end. These functions ought to be more widely known and better advertised. They are often easier to work with than panel functions. My brief overview of these abilities can be found at: http://maths-people.anu.edu.au/~johnm/r-book/add-graphics.html Click on 'Layering in lattice’. John Maindonald email: [email protected] > On 28/11/2015, at 00:00, Drew Tyre <[email protected]> wrote: > > Message: 3 > Date: Thu, 26 Nov 2015 16:33:40 +0000 > From: Drew Tyre <[email protected]> > To: "Granaas, Michael" <[email protected]>, R-sig-teaching > <[email protected]> > Subject: Re: [R-sig-teaching] Choice of graphics package > Message-ID: > > <bn1pr08mb153c8e79af275ab9eaeb45b9e...@bn1pr08mb153.namprd08.prod.outlook.com> > > Content-Type: text/plain; charset="Windows-1252" > > I use R to teach graduate students in the life sciences (mostly ecology but > branching out). So far I show students both lattice and base graphics. I like > lattice graphics for exploration because of the ease of faceting plots. I use > base graphics for "production plots" because I find it easier to tell people > how to add things to a base plot (multiple lines etc). To do that effectively > with lattice graphics you have to learn how to write panel functions, and > that can be a mind bending experience (it was/is for me). > > I have not developed the facility with ggplot that I have with base graphics, > so I can't comment on it. I think if one comes to truly understand the ggplot > model it will be better/faster/easier than either base or lattice graphics, > but it's a new model. I don't know which will be easier to teach to students > hitting it "cold". I'd be interested in hearing from people that have tried > teaching ggplot to students with no prior expeRience. > > -- > Drew Tyre > > School of Natural Resources > University of Nebraska-Lincoln > 416 Hardin Hall, East Campus > 3310 Holdrege Street > Lincoln, NE 68583-0974 > > phone: +1 402 472 4054 > fax: +1 402 472 2946 > email: [email protected] > http://snr.unl.edu/tyre > http://aminpractice.blogspot.com > http://www.flickr.com/photos/atiretoo _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
