[R-sig-teaching] Choice of graphics package
John Maindonald
john.maindonald at anu.edu.au
Sat Nov 28 08:34:22 CET 2015
> "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: john.maindonald at anu.edu.au
> On 28/11/2015, at 00:00, Drew Tyre <atyre2 at unl.edu> wrote:
>
> Message: 3
> Date: Thu, 26 Nov 2015 16:33:40 +0000
> From: Drew Tyre <atyre2 at unl.edu>
> To: "Granaas, Michael" <Michael.Granaas at usd.edu>, R-sig-teaching
> <r-sig-teaching at r-project.org>
> Subject: Re: [R-sig-teaching] Choice of graphics package
> Message-ID:
> <BN1PR08MB153C8E79AF275AB9EAEB45B9E040 at 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: atyre2 at unl.edu
> http://snr.unl.edu/tyre
> http://aminpractice.blogspot.com
> http://www.flickr.com/photos/atiretoo
More information about the R-sig-teaching
mailing list