Dear developers, I wonder would you consider making a save to a graphics file format (as opposed to ps)? What prompts this is that we have just finished my wife's thesis using R heavily for stats and graphs. The combination of latex, bibtex and R generated .eps worked a treat and we were very pleased with both the final outcome and the efficiency of gernerating it, especially when all the graphs were produced in batch from scripts. The experience of preparing a Powerpoint talk from the same material was much less satisfactory, however. It was positively painful converting eps files into png or whatever with scaling difficult to control, and, worst of all, I never succeeded in getting the colours to display properly: white backgrounds turned out a peculiar transparent dirty kahki colour. (I think this must be a ghostscript bug, but one that I have only ever seen tickled by R). In the end I captured them one at a time with xv and the mouse grab. Apart from being a real pain I'm mulling over a project that would have dynamically generated graphs displayed on a web page: mouse capture clearly is out! Would saving graphs in pnm or some other convertable format be difficult? (Or perhaps there is a package that I have not noticed?) Regards, Michael Lapsley ---------------------------------- E-Mail: Michael Lapsley <mlapsley at ndirect.co.uk> Date: 01-Oct-99 Time: 00:13:26 This message was sent by XFMail ---------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 10/1/99, 12:29 AM +0100, Michael Lapsley wrote:> The experience of preparing a Powerpoint talk from the same material was > much less satisfactory, however.Why bother PowerPointing it at all? If you already have the thesis in LaTeX and the graphics in EPS, try using seminar.sty. It's a wonderful style sheet for delivering talks. You can download all the LaTeX files necessary to run seminar.sty in one convenient ZIP file, from ftp://ctan.tug.org/tex-archive/macros/latex/contrib/other/seminar/inputs.zip or ``.tar.gz" in the appropriate place. While that's not an answer to your request for graphics output capabilities in R, it might help you circumvent the question altogether. --Steve Stephen R. Laniel | "I've got a match: Carnegie Mellon University | Your embrace and my collapse." laniel at cmu.edu | --They Might Be Giants -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Check out pstoedit: http://www.geocities.com/SiliconValley/Network/1958/pstoedit/ I use it to convert ps to fig, and then edit the result with xfig: http://www.xfig.org/ Michael Lapsley wrote:> (Or perhaps there is a package that I have not noticed?) >-- ___________________________________________________________ Neil E. Klepeis, School of Public Health, UC Berkeley, USA Web: http://socrates.berkeley.edu/~nklepeis Email: nklepeis at uclink4.berkeley.edu Voice: 510-848-5827 ------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 Fri, 1 Oct 1999, Michael Lapsley wrote:> Dear developers, > > I wonder would you consider making a save to a graphics file format (as opposed > to ps)?You don't tell us the platform you are using, but I guess Unix (because of xv). Powerpoint only runs on Windows to my knowledge, and the Windows version of R already has saves to the sort of files Powerpoint likes, for example Windows metafiles and .gifs. Because you can use the vector-format metafiles this avoids multiple rasterization effects. (It would be not at all easy to do wmf on Unix versions of R.) R 0.65.1 will have a savePlot function in Windows (and rwtest999 does already) to effectively select the menu option to do so.> What prompts this is that we have just finished my wife's thesis using R > heavily for stats and graphs. The combination of latex, bibtex and R generated > .eps worked a treat and we were very pleased with both the final outcome and > the efficiency of gernerating it, especially when all the graphs were produced > in batch from scripts. > > The experience of preparing a Powerpoint talk from the same material was much > less satisfactory, however. It was positively painful converting eps files > into png or whatever with scaling difficult to control, and, worst of all, I > never succeeded in getting the colours to display properly: white backgrounds > turned out a peculiar transparent dirty kahki colour. (I think this must be a > ghostscript bug, but one that I have only ever seen tickled by R). In the end > I captured them one at a time with xv and the mouse grab.You could try re-running the scripts on the Windows version of R.> Apart from being a real pain I'm mulling over a project that would have > dynamically generated graphs displayed on a web page: mouse capture clearly is > out! Would saving graphs in pnm or some other convertable format be difficult? > (Or perhaps there is a package that I have not noticed?)EPS is highly convertable, I reckon, ghostscript being the prime way to do so. I have just tried a simple plot and gs -sDEVICE=pbm -sOutputFile=test.pbm -r150 -q -dNOPAUSE -dBATCH test.ps and also to png256 and pnm with no problems at all (gs 5.50) and with a pure white background. Can you report (to R-bugs) an example problem, please? Quite a few of my talks (in Acrobat format) have plots that started in R, were saved as ps, converted to png (to save display time: they have ca 50k points on, mainly in a few tight clusters) and included by pdftex, and I have never seen a problem. Postponing rasterization (those `graphics' formats are actually bitmap formats) as long as possible is quite desirable, and Acrobat can leave that until display time. Important when one may not know until arriving on another continent the resolution of the computer projector until minutes before the talk. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 Friday, October 01, 1999, Prof Brian D Ripley wrote:> You don't tell us the platform you are using, but I guess Unix (because of > xv). Powerpoint only runs on Windows to my knowledge, and the Windows > version of R already has saves to the sort of files Powerpoint likes, for > example Windows metafiles and .gifs. Because you can use the > vector-format > metafiles this avoids multiple rasterization effects. (It would be not at > all easy to do wmf on Unix versions of R.) > > R 0.65.1 will have a savePlot function in Windows (and rwtest999 does > already) to effectively select the menu option to do so.I agree with Michael Lapsley that Unix R needs the ability to write some graphic file format. My application runs on (Sparc) Solaris, so generating and printing Postscript files is convenient most of the time. But, very often, my users want to take the output and put it in Powerpoint. (There's no way they will use LaTeX.) Also, you can expect people to want, more and more, to put plots in web pages (see http://www.math.montana.edu/Rweb/ for example). It's not pretty, but my solution was adapted from what Jeff Banfield did with Rweb: 1) generate postscript file in R 2) convert to ppm with ghostscript 3) use pnm utilities to convert to gif Anyone who wants more detail may write me, or you can download Jeff's Rweb code. My preference would be that the Unix versions of R be capable of performing a savePlot function to pnm format or directly to gif or png. -- Terry J. Westley, Software Systems Engineering Supervisor Veridian Engineering, Calspan Operations P.O. Box 400, Buffalo, NY 14225 twestley at buffalo.veridian.com http://www.veridian.com -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Michael Lapsley wrote:> > Dear developers, > > I wonder would you consider making a save to a graphics file format (as opposed > to ps)? > > What prompts this is that we have just finished my wife's thesis using R > heavily for stats and graphs. The combination of latex, bibtex and R generated > .eps worked a treat and we were very pleased with both the final outcome and > the efficiency of gernerating it, especially when all the graphs were produced > in batch from scripts. > > The experience of preparing a Powerpoint talk from the same material was much > less satisfactory, however. It was positively painful converting eps files > into png or whatever with scaling difficult to control, and, worst of all, I > never succeeded in getting the colours to display properly: white backgrounds > turned out a peculiar transparent dirty kahki colour. (I think this must be a > ghostscript bug, but one that I have only ever seen tickled by R). In the end > I captured them one at a time with xv and the mouse grab. > > Apart from being a real pain I'm mulling over a project that would have > dynamically generated graphs displayed on a web page: mouse capture clearly is > out! Would saving graphs in pnm or some other convertable format be difficult? > (Or perhaps there is a package that I have not noticed?) >Though not strictly on R, but looking at the number of discussion on this subject, may be people using latex/tex would like to look at PPower4, a Java application which : http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/ The conversion route is: latex/tex ---> pdf(la)tex ---> pdf slides I've not used it yet but the example in the site looks impressive. Regards, ST -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Michael Lapsley, sorry, I can't offer another way to produce graphics from R, but I'd like to suggest to have a look into the pstricks package that is available for TeX/LaTeX. Using this package, together with the seminar package, I've prepared quite a number of slides (using a slide printer), with eps graphics included via the graphicx package. I'm very pleased with the results, and given that your wife's thesis has been written in LaTeX, converting parts into slides using seminar/pstricks shouldn't be too laborious. Please don't hesitate to contact me via e-mail if you'd like to receive the source of the slide environment I'using most of the time (with a color gradient as the general slide background). Best wishes, Ernst Molitor -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._