Skip to content
Prev 656 / 885 Next

Choice of graphics package

On Nov 27, 2015 1:57 PM, "Randall Pruim" <rpruim at calvin.edu> wrote:
mostly do not play well together, so there are time and cognitive
inefficiencies to introducing more than one and switching among them.
(histograms, boxplots, scatter plots, etc.) created from a single data
source.  This is especially true if you are going to use the formula
interface for other things in your course (like linear models), since often
you can move between the model and the plot by changing only the name of
the function:
the same formula interface:
and lays a foundation for modeling.  For this reason, I generally introduce
lattice to beginners.
strength of lattice although this is only slightly harder in ggplot2.  The
default theme for lattice is not to my liking, but it is easy to create a
custom theme to fix that, and with a single command, the new theme applies
to all subsequent plots.  I usually use
one of the downsides of ggplot2.)

That is completely untrue. Whatever downsides ggplot2 may have, this is not
one of them.
or for layering from multiple data sources.    Since it is built on a
?grammar of graphics?, I think it is also more useful as a tool for
training your mind to think about how graphics are constructed and what
makes them work.  In courses where any of these strengths are more
important, I lean toward ggplot2.
data into the formats that ggplot2 likes.  (To some extent this is true of
lattice as well.)  dplyr is another step more challenging than either
lattice or ggplot2 for most students.
could use features of one when working with the other.  I think either can
be taught to beginners, but it will take a bit more effort and time to
teach ggplot2.  You may prefer to teach lattice first and pick an
appropriate time to migrate from lattice to ggplot2.
farther without getting into writing custom panel functions, you might take
a look at packages like gridExtra, latticeExtra, and mosaic, each of which
adds some things to the lattice system.
move from a solid proof of concept to a really robust graphical system.  In
some ways it will be ggplot done right (or at least done with the benefit
of the experience of having done ggplot).  It is built with interactive
plots in mind (and currently doesn?t have a direct way to create things
like PDFs, but that may change over the next year).
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).
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.
of Granaas, Michael <Michael.Granaas at usd.edu>
sloooooooowly been adding some R content to the course.  I do not have a
systematic plan and I haven't yet found the teaching related materials that
will be a good match to my particular course structure.
ggplot2 (and soon ggvis) is an important one to think through.  Depending
on the goals of the course, I can imagine good arguments for using lattice
or ggplot2.  I don?t find base graphics compelling for teaching and never
teach it to my students."
boxplots, histograms, scatterplots.  What are the pros/cons of the
different packages that I should consider as I work to be more planful in
my incorporation of R?
mgranaas at usd.edu
Resident
677 5295
http://maps.secondlife.com/secondlife/Kaseyo/226/38/77