I'm having problems copying and saving lattice graphs using R-1.4.0 under Win2k. It seems I've see this alluded to recently in R-help. If I do the following example:> data(quakes) > xyplot(long ~ lat , data = quakes)And then try to copy or save the graph as either a metafile or bitmap or if I use any of the bitmap/metafile devices via (for example)> png(file="mygraph.png") > data(quakes) > xyplot(long ~ lat , data = quakes) > dev.off()I get the following type of error: Error in grid.newpage() : A png file can store only one figure. or for a metafile: Error: A metafile can store only one figure. This happens using R-1.4.0 installed using SetupR.exe and under R-1.4.0 I make myself. Any help with this is much appreciated. On another note. Is anyone working on an svg graphics for R. Myself and a co-worker have developed svg bubble plots with gis underlays in R and I'm wondering about the possibilities of a more generic svg graphic driver. Thanks! Tom Stockton Neptune and Company stockton at neptuneandco.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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This is known and oft reported (see the archives). It's a problem with grid 0.5, which starts up with a blank page. On Wed, 9 Jan 2002, Thomas Stockton wrote:> I'm having problems copying and saving lattice graphs using R-1.4.0 under > Win2k. It seems I've see this alluded to recently in R-help. > > If I do the following example: > > > data(quakes) > > xyplot(long ~ lat , data = quakes) > > And then try to copy or save the graph as either a metafile or bitmap or if > I use any of the bitmap/metafile devices via (for example) > > > png(file="mygraph.png") > > data(quakes) > > xyplot(long ~ lat , data = quakes) > > dev.off() > > I get the following type of error: > Error in grid.newpage() : A png file can store only one figure. > > or for a metafile: > > Error: A metafile can store only one figure. > > This happens using R-1.4.0 installed using SetupR.exe and under R-1.4.0 I > make myself. > > Any help with this is much appreciated.Read on in the archives for what does work (any means of plotting on screen and then copying). -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I'm having problems copying and saving lattice graphs using R-1.4.0 under Win2k. It seems I've see this alluded to recently in R-help. If I do the following example:> data(quakes) > xyplot(long ~ lat , data = quakes)And then try to copy or save the graph as either a metafile or bitmap or if I use any of the bitmap/metafile devices via (for example)> png(file="mygraph.png") > data(quakes) > xyplot(long ~ lat , data = quakes) > dev.off()I get the following type of error: Error in grid.newpage() : A png file can store only one figure. or for a metafile: Error: A metafile can store only one figure. This happens using R-1.4.0 installed using SetupR.exe and under R-1.4.0 I make myself. Any help with this is much appreciated. On another note. Is anyone working on an svg graphics for R. Myself and a co-worker have developed svg bubble plots with gis underlays in R and I'm wondering about the possibilities of a more generic svg graphic driver. Thanks! Tom Stockton Neptune and Company stockton at neptuneandco.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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi Thomas, I met the same problem (with Win98 and R-1.4.0). It also occurs with wmf but others will work (bmp, jpeg). It seems to come from the grid package. I went back to 1.3.1. to overcome (!) the problem... Best regards, Renaud Thomas Stockton wrote:> > I'm having problems copying and saving lattice graphs using R-1.4.0 under > Win2k. It seems I've see this alluded to recently in R-help. > > If I do the following example: > > > data(quakes) > > xyplot(long ~ lat , data = quakes) > > And then try to copy or save the graph as either a metafile or bitmap or if > I use any of the bitmap/metafile devices via (for example) > > > png(file="mygraph.png") > > data(quakes) > > xyplot(long ~ lat , data = quakes) > > dev.off() > > I get the following type of error: > Error in grid.newpage() : A png file can store only one figure. > > or for a metafile: > > Error: A metafile can store only one figure. > > This happens using R-1.4.0 installed using SetupR.exe and under R-1.4.0 I > make myself. > > Any help with this is much appreciated. > > On another note. Is anyone working on an svg graphics for R. Myself and a > co-worker have developed svg bubble plots with gis underlays in R and I'm > wondering about the possibilities of a more generic svg graphic driver. > > Thanks! > > Tom Stockton > Neptune and Company > stockton at neptuneandco.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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-- Dr Renaud Lancelot, v?t?rinaire CIRAD, D?partement Elevage et M?decine V?t?rinaire (CIRAD-Emvt) Programme Productions Animales http://www.cirad.fr/presentation/programmes/prod-ani.shtml (Fran?ais) http://www.cirad.fr/presentation/en/program-eng/prod-ani.shtml (English) ISRA-LNERV tel (221) 832 49 02 BP 2057 Dakar-Hann fax (221) 821 18 79 (CIRAD) Senegal e-mail renaud.lancelot at cirad.fr -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._