4

我在更改使用包 rgl 生成的 3d 图的文本大小时遇到​​问题。一切正常,但我无法有效地更改 3d 对象的 cex 属性。我在 64 位 Ubuntu 10.04 LTS(2.6.32-37-generic)下运行 R 2.14.1(2011-12-22)。作为示例,请参见以下代码(我在 Stack Overflow 上找到):

library(rgl) 
set.seed(1001) 
n <- 20 
text3d(runif(n),runif(n),runif(n),LETTERS[1:n],cex=seq(0.5,5,length=n))

当我绘制它们时,这些字母的大小都相同。

非常感谢任何帮助!此致。

弗里德·席林格

4

2 回答 2

2

诡异的。它适用于 Ubuntu 10.04 (rgl 0.92.829) [这是我的代码,我认为]。你能告诉我们你的rgl版本吗?“绘图”是指在屏幕上渲染图片,还是生成 PostScript 输出?这已在最新 (0.92.829) 版本中修复:

> news(grepl("text",Text),package="rgl")
Changes in version 0.92.829:

    o   rgl.postscript() now adjusts the size of text following the cex setting.
       The font and family settings are still ignored.

    o   Transparency in material textures was not always rendered properly.
于 2012-02-09T19:05:11.420 回答
0
?text3d

没有 cex 参数。你应该使用“规模”。

于 2012-02-09T16:19:47.243 回答