sandbox/devices.R

length(getHook("before.plot.new"))

setHook("before.plot.new", value=list(function() {
  devices <- names(dev.list())
  if("RStudioGD"%in%devices) 
    dev.set(which(devices=="RStudioGD"))
  else if(length(devices[devices!="Cairo"])==0) dev.new()
}))

x <- dev.list()
class(x)
names(x)


setHook("before.plot.new", value=list)
lgatto/msGUI documentation built on May 21, 2019, 6:05 a.m.