[R] win.metafile use

D.A.Wooff@durham.ac.uk D.A.Wooff at durham.ac.uk
Mon Jul 5 13:00:58 CEST 1999


Platform: Windows 95
Version : R0641

Problem : I wish to plot and save a large number of graphics files in
windows metafont format. I have a very crude postscript printing
function, which happily handles repeated calls:

   psf<-function(filename){
      dev.print(postscript,file=paste(sep="",filename,".ps"),horizontal=F)
      return()
   }

To produce metafont files, I adapt this to, for example, 

   test<-function(filename){
      dev.print(device=win.metafile,file=paste(sep="",filename,".wmf"))
      return()
   }


Repeated calls to this function work satisfactorily for the first few
calls, (e.g 15 calls work, the next does not) but finally it fails
with these messages:

(in a new windows box) 
Impossible to create metafile

(in Rgui)
Error in X11(paste("win.metafile: ", filename, sep = "" ....

folowed by corruption of Rgui. 

What am I missing? I would guess there is some aspect of device handling I've
omitted, and that as a consequence I run out of available handles. 

Can anyone help?

Thanks,

David.


---------------------------------------------------------------------
  David Wooff, Director, Statistics and Mathematics Consultancy Unit,
  Department of Mathematical Sciences, University of Durham.
  Science Laboratories, South Road, Durham, DH1 3LE, UK.
  Tel. 0191 374 4531, Fax 0191 374 7388.
---------------------------------------------------------------------
  

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list