I've noticed that the postscript files produced by R-0.49 come up inverted in my postscript previewer. Also, they do not behave like encapsulated postscript files so they can't be imported into LaTeX documents. If I remove lines with page-oriented commands like "%%Page", "%%Orientation", "\bp" and "\ep", the resulting files seem to behave like legitimate eps files. I've been using the Perl script below to automate the process: ################################################################ # Perl script to produce encapsulated Postscript-like output # from R-0.49-produced Postscript files. (Invoke using the name # of a Postscript file as the argument.) ################################################################ #!/usr/local/bin/perl open(FILE,"./$ARGV[0]"); while (<FILE>) { if (!/\%\%Page./ && !/\%\%Orientation./ && !/\/bp/ && !/\/ep/ && !/^bp\b/ && !/^ep\b/) { s/^\%\!PS-Adobe-3.0/\%\!PS-Adobe-3.0 EPSF-3.0/; print "$_"; } } ################################################################ Unless I am the only person experiencing problems with postscript output, I think it would be a worthwhile project to modify the existing postscript driver to output compliant eps files as an option. If I had the requisite knowledge of postscript, I would volunteer... -- Stephen Shiboski email: steve at biostat.ucsf.edu Division of Biostatistics voice: 415-476-0533 University of California San Francisco fax: 415-476-6014 500 Parnassus Avenue, MU 420 West; San Francisco, CA 94143-0560 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Sat, 7 Jun 1997, Steve Shiboski wrote:> I've noticed that the postscript files produced by R-0.49 > come up inverted in my postscript previewer. Also, they > do not behave like encapsulated postscript files so they > can't be imported into LaTeX documents. If I remove lines > with page-oriented commands like "%%Page", "%%Orientation", > "\bp" and "\ep", the resulting files seem to behave like > legitimate eps files. I've been using the Perl script below > to automate the process: >I haven't had any of these problems. My postscript files come up the right way around in ghostview and import beautifully into LaTeX with \epsfig. They are also in colour (which I have only just worked out how to do in S-PLUS). Most, if not all, of my postscript files were produced by save.plot() rather than by postscript(). This may explain the difference, but they do include the %%Orientation, %%Page, /ep, and so on. Also, in earlier versions of R I used postscript() with no problems. What LaTeX commands and dvi converter are you using? I have used both the NTeX (on Linux) and teTeX versions of LaTeX2e with the dvips converter, and used the epsfig package. Thomas Lumley ------------------------------------------------------+------ Biostatistics : "Never attribute to malice what : Uni of Washington : can be adequately explained by : Box 357232 : incompetence" - Hanlon's Razor : Seattle WA 98195-7232 : : ------------------------------------------------------------ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=