if(interactive() || Sys.getenv("USER") == "maechler"
) {
ps.do("ex.ps")
data(sunspots)
plot(sunspots)
ps.end()
}
ps.latex("ex2.eps")
plot(sunspots)
ps.end(call.gv = FALSE) # basically the same as dev.off()
Run the code above in your browser using DataLab