Skip to content

Generating EPS figures automatically (like Sweave)

1 message · Dieter Menne

#
eariasca <eariasca <at> math.ucsd.edu> writes:
I normally use this type of code when not using Sweave

ToPostscript = TRUE
if (ToPostscript){
  trellis.device("postscript",file="myfile.ps",width=6,height=4,color=FALSE)
} else
{
  windows( height=4,width=6)
}
# Do the plot-works

if (ToPostscript){
  dev.off()
  sink()
}


## And use GhostFriend from 
http://www.noliturbare.com/ReadGhostFriend.htm 
to create TIFF if your publisher asks for it.