[R] changing existing graphs optimally

John Kane jrkrideau at yahoo.ca
Fri Apr 6 03:22:37 CEST 2007


--- hadley wickham <h.wickham at gmail.com> wrote:

> 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

Well,  back to ggplot! I had forgotten this aspect of
ggplot and was mucking about with plot. With any luck
you've save me a lot of time.



More information about the R-help mailing list