简体   繁体   English

R grid.table-表格使绘图保持在其他绘图之上

[英]R grid.table - table keeps plotting on top of other plots

I'm trying to use grid.table for the first time. 我正在尝试第一次使用grid.table。
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)

在此处输入图片说明 library(gridExtra) 图书馆(gridExtra)

You can use grid.newpage() to get a new page in your panel. 您可以使用grid.newpage()在面板中获取新页面。

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

grid.newpage()

grid.table(d)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM