[R] changing existing graphs optimally

hadley wickham h.wickham at gmail.com
Thu Apr 5 19:44:19 CEST 2007


On 4/5/07, Greg Snow <Greg.Snow at intermountainmail.org> wrote:
> Using traditional and lattice(trellis) graphics, the usual approach is
> to have your plotting commands in a script file (under windows you can
> use the one with the GUI, in linux/unix you can have a text editor open
> with the script).  Then either run the commands by copy/paste or using
> the source function.  Then when you see something tha you would like to
> change, just do the edits and rerun the code.
>
> The ggplot package has some functionality for first specifying the data
> that you want plotted, then how you want it plotted, then the command to
> actually create the plot.  You can then modify how you want it plotted
> and replot again.

Yes, the current version of ggplot can this, although it's not very
well exposed to the user.  The current development version uses the
idea of plot modification extensively, and it's also very easy to take
the same plot specification and use it with a different data set.

Hadley



More information about the R-help mailing list