You should not be reading this. It is dark secret :)
pc = knitr:::plot_calls
What does par() produce?
par(mar = c(4, 4, 0.1, 0.1))
x = recordPlot()
pc(x)
## [1] ".External2"
And layout():
layout(matrix(c(1, 2, 1, 3), 2))
x = recordPlot()
pc(x)
## [1] ".External.graphics"
Both par() and layout():
layout(matrix(c(1, 2, 1, 3), 2))
par(mar = c(4, 4, 0.1, 0.1))
x = recordPlot()
pc(x)
## [1] ".External.graphics" ".External2"
More par():
layout(matrix(c(1, 2, 1, 3), 2))
par(mar = c(4, 4, 0.1, 0.1))
par(cex = 1.4)
x = recordPlot()
pc(x)
## [1] ".External.graphics" ".External2" ".External2"
A new plot by plot.new():
plot.new()
x = recordPlot()
pc(x)
## [1] ".External2" ".Call.graphics"
A new plot by grid.newpage():
library(grid)
grid.newpage()
x = recordPlot()
pc(x)
## [1] ".Call.graphics"
My session info:
sessionInfo()
## R version 3.0.0 (2013-04-03)
## Platform: x86_64-pc-linux-gnu (64-bit)
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=C LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] grid stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] knitr_1.2.4
##
## loaded via a namespace (and not attached):
## [1] digest_0.6.3 evaluate_0.4.3 formatR_0.7.2 stringr_0.6.2
## [5] tools_3.0.0