Earl F. Glynn
2005-Feb-08 17:35 UTC
[R] Windows BMPs: Why grey background? How to display BMP in R?
"white" is supposed to be the default background for BMPs (according to ?bmp) but it doesn't work> bmp("test.bmp", bg="white")> plot(0)> dev.off()# results in grey background # This seems to be a good enough workaround for now.> bmp("test.bmp")> par(bg="white")> plot(0)> dev.off()# background is white Should bmps have been fixed when jpegs with a similar grey background were fixed for Windows? http://tolstoy.newcastle.edu.au/R/devel/04/10/0914.html>> jpeg("test.jpeg", bg="orangered") >> plot(1:10, 1:10, col="green") >> dev.off()>There was a Windows-specific bug, for which I've just committed a fixHow can I display a bmp directly in R? When plotting 100,000+ points (common with flow cytometry data) [or even the 10,000s of points with microarray data] the Windows metafile is not the way to go (nor is postscript) because the files are too large and repainting them takes too long. Does R provide a way to plot to a bmp and then display that graphic immediately? It's a pain to leave R just to view the graphics. JPGs work fine for real world images, but not that well for drawings. BMPs look like the only alternative when plotting a huge number of points so the file size is reasonable. (GIFs with drawings would be even better than BMPs. I guess I could try PNGs.) With the GIF/LZW patent issue now in the past, why not have a GIF driver and even support creation/display of some simple animated GIFs in R? Earl F. Glynn Scientific Programmer Stowers Institute for Medical Research
Duncan Murdoch
2005-Feb-08 19:29 UTC
[R] Windows BMPs: Why grey background? How to display BMP in R?
On Tue, 8 Feb 2005 11:35:22 -0600, "Earl F. Glynn" <efg at stowers-institute.org> wrote :>"white" is supposed to be the default background for BMPs (according to >?bmp) but it doesn't work > > > >> bmp("test.bmp", bg="white") > >> plot(0) > >> dev.off() > ># results in grey backgroundIn what version of R? I just tried in 2.01 and R-patched, and it was fine. Maybe the problem is your viewer? Duncan Murdoch