################################################# # chunk number 1: ################################################# windows(bg="cornsilk") dev.control("inhibit") plot(1:10) # Cover/uncover window # Resize window ################################################# # chunk number 2: ################################################# dev.control("enable") plot(1:10) # Resize window ################################################# # chunk number 5: ################################################# plot(1:10) myplot <- recordPlot() lapply(myplot[[1]], "[[", 1) ################################################# # chunk number 7: ################################################# plot(1:10) legend(1, 10, "An example", pch=1, bg="tan") # Resize window ################################################# # chunk number 8: ################################################# lapply(recordPlot()[[1]], "[[", 1) ################################################# # chunk number 10: ################################################# plot(1:10) recordGraphics(legend(1, 10, "An example", pch=1, bg="tan"), list(), globalenv()) # Resize window ################################################# # chunk number 11: ################################################# lapply(recordPlot()[[1]], "[[", 1) ################################################# # chunk number 13: ################################################# recordPlot()[[1]][[8]] ################################################# # chunk number 15: ################################################# windows(bg="cornsilk") source("dynamic.R") grid.dynamic() # Resize window ################################################# # chunk number 17: ################################################# plot(1:10) recordGraphics(legend(1, 10, "An example", pch=1), list(), emptyenv()) ################################################# # chunk number 18: ################################################# recordGraphics(recordGraphics(plot(1:10), list(), getNamespace("graphics")), list(), getNamespace("graphics")) # Resize window recordPlot()[[1]] ################################################# # chunk number 19: ################################################# recordGraphics({ plot(1:10); windows() }, list(), getNamespace("graphics")) # Resize window ################################################# # chunk number 20: ################################################# grid.circle() recordPlot()[[1]] getNames() ################################################# # chunk number 21: ################################################# grid.dynamic dynamicGrob body(drawDetails.dynamic) ################################################# # chunk number 22: ################################################# recordGraphics(grid.circle(), list(), globalenv()) # Resize window recordPlot()[[1]] getNames()