R1.7.0, Win2k: When I use plot( ) on a groupedData object, if I have 165 subjects I'm supposed to be able to use plot(..., layout = c(5,3,11)) to get all 165 on 11 separate sheets. The graphics window is only displaying the first 10. If I use plot(..., layout = c(5,3,12)) I get the appropriate 11 sheets. Furthermore, yesterday I noticed that when using plot( <linear model object> ) along with the "record" feature, after using "Page Up" to scroll up through the graphs, I was unable to scroll back down to the last (fourth) graph to see the Cook's Distance plot, though the first three plots remained "scollable". What is going on? Does R for Windows have issues with the last plot in a series of plots? Thanks in advance, david paul
On Mon, 23 Jun 2003, Paul, David A wrote:> R1.7.0, Win2k: > > When I use plot( ) on a groupedData object, > if I have 165 subjects I'm supposed to be able > to use plot(..., layout = c(5,3,11)) to get > all 165 on 11 separate sheets. The graphics > window is only displaying the first 10. If I > use plot(..., layout = c(5,3,12)) I get the > appropriate 11 sheets. > > Furthermore, yesterday I noticed that when using > plot( <linear model object> ) along with the > "record" feature, after using "Page Up" to scroll > up through the graphs, I was unable to scroll > back down to the last (fourth) graph to see > the Cook's Distance plot, though the first three > plots remained "scollable". > > What is going on? Does R for Windows have issues > with the last plot in a series of plots?Perhaps recording does, as people have reported similar things, but neither Duncan nor I could reproduce them. I've just tried several plot.lm examples, and it worked flawlessly. We can't help you further unless you can produce reproducible examples. -- 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
> -----Original Message----- > From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] > Sent: 23 June 2003 22:35 > To: Paul, David A > Cc: r-help at stat.math.ethz.ch > Subject: Re: [R] ?plot problem > > > On Mon, 23 Jun 2003, Paul, David A wrote: > > > R1.7.0, Win2k: > > > > When I use plot( ) on a groupedData object, > > if I have 165 subjects I'm supposed to be able > > to use plot(..., layout = c(5,3,11)) to get > > all 165 on 11 separate sheets. The graphics > > window is only displaying the first 10. If I > > use plot(..., layout = c(5,3,12)) I get the > > appropriate 11 sheets. > > > > Furthermore, yesterday I noticed that when using > > plot( <linear model object> ) along with the > > "record" feature, after using "Page Up" to scroll > > up through the graphs, I was unable to scroll > > back down to the last (fourth) graph to see > > the Cook's Distance plot, though the first three > > plots remained "scollable". > > > > What is going on? Does R for Windows have issues > > with the last plot in a series of plots? > > Perhaps recording does, as people have reported similar things, but > neither Duncan nor I could reproduce them. I've just tried several > plot.lm examples, and it worked flawlessly. We can't help you further > unless you can produce reproducible examples.I can reproduce this behaviour which has been discussed several times on this list as far as I remember. After turning plot history on, execute> plot(lm(I(sin(1:10)~I(1:10))))and have a look at all plots. If you then step back using PgUp, and step forward again with PgDn, the last plot can't be reached. This is because it was never finished; R plots don't know whether you still want to add something, so this plot hasn't been "saved" yet. The solution is to "add" the plot first, using INS (or History_Add), or create another plot, or,... That finishes the plot, and makes it available in the history. Hope that helps. Thomas> version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 7.0 year 2003 month 04 day 16 language R --- Thomas Hotz Research Associate in Medical Statistics University of Leicester United Kingdom Department of Epidemiology and Public Health 22-28 Princess Road West Leicester LE1 6TP Tel +44 116 252-5410 Fax +44 116 252-5423 Division of Medicine for the Elderly Department of Medicine The Glenfield Hospital Leicester LE3 9QP Tel +44 116 256-3643 Fax +44 116 232-2976
Thanks to Dr. Thomas Hotz, Prof. Brian Ripley, Dr. Dennis Murphy, and Dr. David Scott for their replies. Trying an idea:> x <- c(1,2,3,4) > y<-c(2,4.2,5.9,9) > temp<-data.frame(cbind(x,y)) > attach(temp) > temp.lm <- lm(y~x) > windows() > plot(temp.lm)Hit <Return> to see next plot: Hit <Return> to see next plot: Hit <Return> to see next plot: Hit <Return> to see next plot:> dev.off() > windows()I was unable to see the Cook's distance plot as before (using the Page Up and Page Down keys). So I implemented another suggestion:> windows() > plot(temp.lm)Hit <Return> to see next plot: Hit <Return> to see next plot: Hit <Return> to see next plot: Hit <Return> to see next plot: [Use Menu: History|Add] After doing this, the Cook's distance plot was "saved" so that Page Up and Page Down worked properly. Question: Is there a way to use a line command to "add" the last graph to the history? Much thanks again, david paul