I have some data that I need to view in various 3-D clouds. To better see the cloud structure on a 2-D screen I would like to output a bunch of bmp files with clouds at slightly different angles, then run them through an external program to animate them. But I'm having trouble getting cloud() from the lattice package to output to bmp files. Oddly, this is only a problem when outputting multiple files in a loop. WORKS FINE:> bmp("d:/test2.bmp"); cloud(z~x+y); dev.off()ALSO WORKS:> bmp("d:/test01.bmp"); cloud(z~x+y); dev.off(); bmp("d:/test02.bmp");cloud(z~x+y); dev.off(); DOES NOT WORK (produces blank bitmaps):> for(i in 1:3) {bmp("d:/test2.bmp"); cloud(z~x+y); dev.off()}Is this a bug? Is there a way to make this work? (working in MS Windows XP x64 with R 2.4.0) Thanks! --- Eric B. Peterson Vegetation Ecologist Nevada Natural Heritage Program [[alternative HTML version deleted]]
This is FAQ Q7.22 On Fri, 8 Dec 2006, Eric Peterson wrote:> I have some data that I need to view in various 3-D clouds. To better see > the cloud structure on a 2-D screen I would like to output a bunch of bmp > files with clouds at slightly different angles, then run them through an > external program to animate them. But I'm having trouble getting cloud() > from the lattice package to output to bmp files. Oddly, this is only a > problem when outputting multiple files in a loop. > > WORKS FINE: >> bmp("d:/test2.bmp"); cloud(z~x+y); dev.off() > > ALSO WORKS: >> bmp("d:/test01.bmp"); cloud(z~x+y); dev.off(); bmp("d:/test02.bmp"); > cloud(z~x+y); dev.off(); > > DOES NOT WORK (produces blank bitmaps): >> for(i in 1:3) {bmp("d:/test2.bmp"); cloud(z~x+y); dev.off()} > > Is this a bug? > > Is there a way to make this work? > > (working in MS Windows XP x64 with R 2.4.0) > > Thanks! > > --- > > Eric B. Peterson > > Vegetation Ecologist > > Nevada Natural Heritage Program > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.Please do take note here. -- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 12/8/06, Eric Peterson <peterson at heritage.nv.gov> wrote:> I have some data that I need to view in various 3-D clouds. To better see > the cloud structure on a 2-D screen I would like to output a bunch of bmp > files with clouds at slightly different angles, then run them through an > external program to animate them. But I'm having trouble getting cloud() > from the lattice package to output to bmp files. Oddly, this is only a > problem when outputting multiple files in a loop. > > WORKS FINE: > > bmp("d:/test2.bmp"); cloud(z~x+y); dev.off() > > ALSO WORKS: > > bmp("d:/test01.bmp"); cloud(z~x+y); dev.off(); bmp("d:/test02.bmp"); > cloud(z~x+y); dev.off(); > > DOES NOT WORK (produces blank bitmaps): > > for(i in 1:3) {bmp("d:/test2.bmp"); cloud(z~x+y); dev.off()} > > Is this a bug?No, but it's a FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f -Deepayan