Greetings, R-Citizens: I have the good fortune of working with a 19" 1280 X 1024 pixel monitor. My R-code produces nice-looking graphics on this machine but the same code results in crowded plots on an older machine with 800 X 600 resolution. In hindsight this seems obvious, but I didn't anticipate it. My code will be used on machines with varying graphics (and memory) capacity. Is there a way I can check the native resolution of the machine so that I can make adjustments to my code for the possible limitations of the machine running it? Thanks. Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com phone: 561-352-9699 eFax:? 614-455-3265 http://www.StatisticalEngineering.com ?
how about producing pdf output- should be the same on every PC... Charles Annis, P.E. schrieb:> Greetings, R-Citizens: > > I have the good fortune of working with a 19" 1280 X 1024 pixel monitor. My > R-code produces nice-looking graphics on this machine but the same code > results in crowded plots on an older machine with 800 X 600 resolution. In > hindsight this seems obvious, but I didn't anticipate it. > > My code will be used on machines with varying graphics (and memory) > capacity. Is there a way I can check the native resolution of the machine > so that I can make adjustments to my code for the possible limitations of > the machine running it? > > Thanks. > > > Charles Annis, P.E. > > Charles.Annis at StatisticalEngineering.com > phone: 561-352-9699 > eFax: 614-455-3265 > http://www.StatisticalEngineering.com > > > ______________________________________________ > 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. > > >
You forgot to mention your OS. This was asked before and if I recall correctly the answer for Windows was no. An acceptable solution (imho) is to edit the Rprofile.site files and add something like pngplotwidth <- 990 ; pngplotheight <- 700 pdfplotwidth <- 14 ; pdfplotheight <- 10 Then, use these values in your functions. It's manual, but you only need to do this once for each machine.> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of > Charles Annis, P.E. > Sent: Monday, August 28, 2006 8:50 AM > To: r-help at stat.math.ethz.ch > Subject: [R] screen resolution effects on graphics > > Greetings, R-Citizens: > > I have the good fortune of working with a 19" 1280 X 1024 > pixel monitor. My > R-code produces nice-looking graphics on this machine but the > same code > results in crowded plots on an older machine with 800 X 600 > resolution. In > hindsight this seems obvious, but I didn't anticipate it. > > My code will be used on machines with varying graphics (and memory) > capacity. Is there a way I can check the native resolution > of the machine > so that I can make adjustments to my code for the possible > limitations of > the machine running it? > > Thanks. > > > Charles Annis, P.E. > > Charles.Annis at StatisticalEngineering.com > phone: 561-352-9699 > eFax: 614-455-3265 > http://www.StatisticalEngineering.com > > > ______________________________________________ > 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. >
On Mon, 28 Aug 2006, Charles Annis, P.E. wrote:> Greetings, R-Citizens: > > I have the good fortune of working with a 19" 1280 X 1024 pixel monitor. My(Similar to our student lab has used for many years.)> R-code produces nice-looking graphics on this machine but the same code > results in crowded plots on an older machine with 800 X 600 resolution. In > hindsight this seems obvious, but I didn't anticipate it.It is not obvious to me: I have never experienced it. What OS and graphics device is this? Almost all of R's graphics is independent of the screen resolution (the exception being the bitmapped devices such as jpeg), with things sized in inches or points. My machines are 1600x1200 (apart from 1280x800 on my laptop), so I meet a considerable reduction when using a computer projector, and my plots do not look crowded. However, one issue is when the OS has a seriously incorrect setting for the screen resolution and so does not give the sizes asked for by R. We have seen that on both Linux and Windows, and the windows() device has arguments to set the correct values. (On X11 you should be able to set this in Xconfig files.) If this is Windows, check carefully the description of the initial screen size in ?windows. That can have unexpected effects on physically small screens. At one time the X11() device was set up to assume 75dpi unless the reported resolution was 100+/-0.5dpi. My then monitor reported 99.2 dpi and so things came out at 3/4 of the intended size. We fixed that quite a while back.> My code will be used on machines with varying graphics (and memory) > capacity. Is there a way I can check the native resolution of the machine > so that I can make adjustments to my code for the possible limitations of > the machine running it?Only via C code, which is how R does it. -- 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