Skip to content
Prev 258326 / 398502 Next

Retrieving call sequence leading to a plot / Zooming in maps

You could always put the commands into a script or function, then instead of retyping everything just run the script or function.

There is the zoomplot function in the TeachingDemos package which does what you are suggesting (but my quick test did not work with your map).  You could use that as a starting point to write your own function (or find why it is not working for the map).  It might work better on a smaller resolution.

There is also the history function (and friends) that will show recent commands, but figuring out which functions contributed to the plot and how to modify and rerun them could be tricky.

You might try writing a single function that takes the limits of the plot then runs the plot commands and creates your plot, then either run this function with different limits, or run it inside of tkexamp (also in the TeachingDemos package) so that you can modify the limits using controls and see the zoomed plot that way.  The fgui, playwith, and rpanel packages may also give some other options for interactively zooming the plot.

You could also send your plot to a file, then do you zooming in an outside program (inkskape will edit svg files).