[ESS] Graphics in emacs window: how to copy R screen devices in non-interactive sessions (remotes)

Vitalie Spinu spinuvit at gmail.com
Tue Nov 19 02:40:36 CET 2013


I was hoping to make it at least partially work with plot.new and
before.plot.new hooks. But I cannot make it work even for completed
plots.

What about qtbase + qtutils? Any hope there for capturing incremental
graphics? I installed it but cannot see anything useful.

 > For incremental changes, it's easy to catch them at the device layer. Assuming
 > implementing a custom graphics device is outside the scope, you would need to do
 > something like take a snapshot each time R becomes idle, which would be a lot of
 > overhead. 

Not really feasible. We cannot reliably know when R is idle.

 > So you might need your own device that would print to stdout, with
 > some prefix that hides it from the buffer. Not completely infeasible.

It should be a modification of an existing device. That to say, instead
of buffering the output, the device should flush the content into a file
each time a major change has been made. The problem is how you define a
"major change". 

Another idea is to change print methods for grid and a couple of
internal plotting routines for base graphics to re-save the device each
time a modification has been made.

   Vitalie



More information about the ESS-help mailing list