Re: [R] how to pause between graphics

From: Greg Snow <Greg.Snow_at_imail.org>
Date: Tue, 25 Nov 2008 09:19:17 -0700

If the reason you want to pause is so that you can save a copy of the graph, or go back and look at earlier ones, then it may be easiest to just write all the graphs to a file to start with. Use the pdf device, write all the graphs to the pdf file, close the file using dev.off, then open the pdf file and page through the graphs.

Not a direct answer to your question, but hope it helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow_at_imail.org
801.408.8111



> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-
> project.org] On Behalf Of Peter B. Mandeville
> Sent: Tuesday, November 25, 2008 6:08 AM
> To: r-help_at_r-project.org
> Subject: [R] how to pause between graphics
>
> Dear list:
>
>
>
> Before posting this message, I read the posting guide, examined the
> manuals,
> searched the R help files, and examined in detail the books that I have
> available on R.
>
>
>
> I am using R version 2.8.0 and WinXP.
>
>
>
> I want to pause the R Graphics window to permit the use of the File,
> History, and Resize options between each graphic in a series of
> graphics. If
> I use the functions
>
>
>
> par(ask=T)
>
>
>
> or
>
>
>
> devAskNewPage(ask=T)
>
>
>
> between the graphics there is a pause but one cannot use the File,
> History,
> and Resize options. For an example use
>
>
>
> demo(Graphics)
>
>
>
> What I want to do is approximated by the following code:
>
>
>
> trat <- factor(c(rep("A",5),rep("B",5),rep("C",5)))
>
> trat
>
> resp <-
> c(rnorm(5,mean=5,sd=1.75),rnorm(5,mean=6.5,sd=1.75),rnorm(5,mean=15,sd=
> 1.75)
> )
>
> aovOBJ <- aov(resp~trat)
>
> summary(aovOBJ)
>
>
>
> AOV <- function(aovOBJ){
>
> print(tmp <- summary.lm(aovOBJ))
>
> boxplot(tmp$resid,col="grey")
>
> reply <- readline(prompt="Next:")
>
> hist(tmp$resid,freq=F,col="grey",breaks="fd",xlab="",ylab="",main="")
>
> xfit <- seq(min(tmp$resid),max(tmp$resid),length=40)
>
> yfit <- dnorm(xfit,mean=mean(tmp$resid),sd=sd(tmp$resid))
>
> lines(xfit,yfit,col="red")
>
> reply <- readline(prompt="Next:")
>
> require(car,quietly=T)
>
> qq.plot(tmp$resid,ylab="empirical",main="",col="black")
>
> detach("package:car")
>
> reply <- readline(prompt="Next:")
>
> plot(density(tmp$resid),main="")
>
> reply <- readline(prompt="Next:")
>
> plot.design(aovOBJ$model)
>
> reply <- readline(prompt="Next:")
>
> tmp <- TukeyHSD(aovOBJ)
>
> plot(tmp)
>
> }
>
>
>
> AOV(aovOBJ)
>
>
>
> There ought to exist a lot easier user friendly way to do this. Does
> anyone
> know one?
>
>
>
> Thank you very much,
>
>
>
> pbm
>
>
>
> Peter B. Mandeville
>
> cel: 444 860 3204
>
> tel: 52 444 826 2346-49 ext 532
>
> fax: 52 444 826 2350
>
>
>
> P.D. Favor de confirmar la llegada de este correo. Gracias.
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org 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.
______________________________________________ R-help_at_r-project.org 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.
Received on Tue 25 Nov 2008 - 16:41:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 26 Nov 2008 - 07:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive