1

I'm trying to use grid.table for the first time.
The tables keep plotting on top of what ever is in the plotting window. In other words, it does not create a new Plot display, it just added it onto what ever is there already.
Is there a way to force it to use a new plotting window?

library(grid)
d <- head(iris[,1:3])
plot(d)
grid.table(d)

enter image description herelibrary(gridExtra)

jmich738
  • 1,565
  • 3
  • 24
  • 41
  • They're using different graphics systems: "base graphics" vs "grid graphics" Pat Murrell (the developer of grid) has some good explanations. – wibeasley Mar 09 '18 at 03:58
  • 1
    Here's a good example of combining the two systems in the same graphic: https://stackoverflow.com/questions/25192838/arrange-base-plots-and-grid-tables-on-the-same-page – wibeasley Mar 09 '18 at 04:03
  • this is actually the opposite of what I was trying to do, but it's also the next thing I was going to try. – jmich738 Mar 09 '18 at 04:10

1 Answers1

5

You can use grid.newpage() to get a new page in your panel.

library(grid)
d <- head(iris[,1:3])
plot(d)
library(gridExtra)

grid.newpage()

grid.table(d)