Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to pause plots in R


View products that this article applies to.

I have a script running fine in RRE 7.4.0 and the script generates 4 histograms. When histogram1 is generated, I can see it in the R Graphics Device window but then when histogram2, 3 and 4 are generated in sequence, I can only see the last one, histogram4. I do not see a way to navigate and do a Page Up/Down and see all 4.

Is there some option can initialize this option at the start of my script?

Sample

plot.fun <- function(){ 
# Opens a window and starts recording 
windows(record=TRUE) 
op <- par(ask=TRUE) 
on.exit(par(op))

# Simple set of 5 plots - you can add you plotting code here

for (i in 1:5){ 
plot(1:i) 

#Stops recording. 
windows.options(record=FALSE) 

plot.fun()

Once you execute this, you can push <enter> or click next to through the slides. Once they are all rendered, you can page up or down to navigate.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 3103826
Revision : 1
Created on : 1/7/2017
Published on : 11/1/2015
Exists online : False
Views : 77