On 03/11/2013 02:19 AM, Sherri Heck wrote:
Dear all,

I am curious if anyone knows of a command/program that would enable one to
edit a figure in R once it is created (akin to Matlab).  Currently, if I
need to make any changes to the figure I do so and then have to run the
plotting portion of the code again.  I have searched the R site mailing
lists, etc to no avail.  Any help is greatly appreciated.

Hi Sherri,
As Jeff has pointed out, graphics devices in R are almost entirely cumulative in operation. You can display something, then add something else, but you don't have a buffer for the various objects in a complex plot that allows those objects to be altered or deleted.

The playwith package would probably allow you to do what you want, but there is a certain amount of learning necessary and you have to navigate the complexity that is hidden in most interactive plotting packages. That said, if you have to do a lot of this, it is worth the effort.

What most of us do is to build plots up as scripts in an external editor and then "source" the scripts. You can make incremental changes and the new plot just pops up when you source the code.

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to