Greg Distiller
2006-Jun-20 09:41 UTC
[R] NLME: using the layout option with the plot command
Hi This is the 2nd time I am posting this question as I never got a reply the 1st time round - apologies to anybody who might take offense at this but I dont know what else to do. I am struggling to split up the plots of the grouped objects in nlme in a usable way. The standard plot command generates plots for each group on a single page. When there are many groups however this does not look so good. I have discovered the layout option which allows one to split up these plots over a certain number of pages but the problem is it very quickly scrolls through all the pages only leaving the final page in the viewer. My question is how does one get to view all these pages? Or even better is there an option where the pages change only when prompted by the user? Thanks Greg
David Hugh-Jones
2006-Jun-20 10:29 UTC
[R] NLME: using the layout option with the plot command
hi greg If you are using windows, set up a plot window and click the "Record" option in the menu. Then run the command. Now you can scroll back through previous pages by hitting Page Up. Beware that if you save your workspace without clearing the history, you may have a lot of bloat from the graphs. David On 20/06/06, Greg Distiller <gregd at stats.uct.ac.za> wrote:> Hi > This is the 2nd time I am posting this question as I never got a reply the > 1st time round - apologies to anybody who might take offense at this but I > dont know what else to do. > > I am struggling to split up the plots of the grouped objects in nlme in a > usable way. The standard plot command generates plots for each group on a > single page. When there are many groups however this does not look so good. > I have discovered the layout option which allows one to split up these plots > over a certain number of pages but the problem is it very quickly scrolls > through all the pages only leaving the final page in the viewer. > > My question is how does one get to view all these pages? Or even better is > there an option where the pages change only when prompted by the user? > > Thanks > > Greg > > ______________________________________________ > 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 >
Mark Difford
2006-Jun-20 12:24 UTC
[R] NLME: using the layout option with the plot command
Hi Greg, Since you haven't yet had a response, you could distill this. It uses the pixel dataset from nlme() as an example. ## To get separate files, do this postscript("c:\MyGraph%03.ps", onefile=F) plot(Pixel, display = "Dog", inner = ~Side, layout=c(4,1)) dev.off() ## To get your layout into one file, as separate pages, do this postscript("c:\MyGraph.ps", onefile=T) plot(Pixel, display = "Dog", inner = ~Side, layout=c(4,1)) dev.off() If you prefer pdf, then use : pdf(filename, onefile=F), &c. At the R prompt do : ?postscript (and ?pdf), and go on reading! Also have a look at setps() in package Hmisc. Regards, Mark. Mark DiffordPh.D. candidate, Botany Department, Nelson Mandela Metropolitan University, Port Elizabeth, SA.