【发布时间】:2013-11-24 00:00:31
【问题描述】:
很好奇如何创建仅包含文本信息的情节。这基本上是绘图窗口的“打印”。
到目前为止,我发现的最佳选择如下:
library(RGraphics)
library(gridExtra)
text = paste("\n The following is text that'll appear in a plot window.\n",
" As you can see, it's in the plot window",
" One might imagine useful informaiton here")
grid.arrange(splitTextGrob(text))
然而,一个人无法控制(据我所知)字体类型、大小、对齐方式等。
【问题讨论】:
-
你不需要
grid.arrange或gridExtra,只需grid.draw()