Hi,

Is it possible to :

[1] set a default location to plot graphs in png format with specific
dimensions & resolution. I want to plot to a directory which is a shared on
the network (samba share), so as to view the plots from a different machine.

[2] call dev.off() 'automagically' after a call to the plot function, by
(somehow) setting it as a default behavior in .Rprofile.site? This would be
nice to have, so as to update an image viewer running on a local machine
which keeps displaying the image(s) in the shared plot folder on the remote
machine (which runs R)

I was thinking on the lines of adding the following to .Rprofile.site :
__________

prior2plot <- function() {plotfile <-  paste('/srv/samba/share/Rplot-',
as.character(format(Sys.time(), "%Y%m%d-%H%M%S")), '.png', sep='');
png(filename=plotfile, width=1280, height=800)}

setHook("before.plot.new", prior2plot())

__________

However, the above does not seem to work beyond a first plot.

Best wishes,

Vishal

        [[alternative HTML version deleted]]

______________________________________________
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