Repeat plot command with minor changes in R

Viewed 854

I made a plot in R and I want to repeat all the commands (like plot(), legend() or line()) that were carried out for this plot, with some minor changes. For example I want to set the axes to logarithmic scale and change the title of the plot.

In gnuplot I would use the replot command.

plot ...
set title "The same plot with logarithmic axes"
set logscale
replot

Is something like this possible in R. The only thing that comes to my mind of doing this (besides changing the values manually and re-run the lines of codes) would be setting up a function, that asks for all parameters that might be changed by the user.

Thanks for your help,

Sven

1 Answers
Related