[R] Plot to postscript in function
malbani at fas.harvard.edu
Tue Jan 28 19:27:03 CET 2003
Thanks to Prof. Ripley,
this version of the fucntion works as expected
#function to plot all sort of cohort information to
#a single eps for storage and future printing or display
pippo <- deparse(substitute(the.data))
thefile <- paste(c("../ed/",pippo,"/",pippo,".eps"),collapse = "")
postscript(file= thefile, paper = "letter")
#plot cohort variables
#plot allometry checks
The use of postscript() instead of trellis.device() to open the device
doesn't seem to be a problem.
Thanks to everyone who answered me.
ripley at stats.ox.ac.uk wrote:
> You appear to be using lattice commands to plot on a postscript device:
> you should be using a trellis.device.
> Also, you do need to *print* lattice commands, and I guess you are
> not doing so in the custom commands which you are not showing us.
> Wre those calls to zyplot, they would not work unless surrounded by
> Please be careful to distinguish the use of lattice from `plotting',
> as the details are where I suspect the problem arises.
Marco Albani, Ph.D.
Dept. of Organismic and Evolutionary Biology
HUH 22 Divinity Avenue
Tel: +1 617 495 1621
Fax: +1 617 495 9484
More information about the R-help