Skip to content
Prev 319189 / 398506 Next

Editing figure without re-running the plotting code?

Jim:

Whoaaa...  this is only true for base graphics!

For grid graphics -- on which both lattice and ggplot are built --
there is a defined object structure for graphics complete with
extensive editing capabilities. See, e.g. ?grid.edit in the grid
package.

Both lattice and ggplot can and do take advantage of grid grobs -
graphical objects, e.g. via updating and layering. Whether this is
more or less convenient than editing graphics code is another issue,
but the answer to the query is certainly "yes."

I admit, however, that the modified displayed object must be redrawn
-- you do not work directly and interactively with the display. But
in many ways grid's programmatic editing and redisplay of modified
grobs is more flexible and powerful, I would say. In any case, the
editing capabilities  exist.

-- Bert
On Sun, Mar 10, 2013 at 3:47 PM, Jim Lemon <jim at bitwrit.com.au> wrote: