Cannot change text size in rgl plot

依然范特西╮ 提交于 2019-12-22 08:41:53

问题


I have a problem changing the text size of a 3d plot I generated with the package rgl. Everything works fine, but I can't effectively change the cex properties of an 3d object. I run R 2.14.1 (2011-12-22) under 64bit Ubuntu 10.04 LTS (2.6.32-37-generic). As an example see the following code (I found on 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))

The letters have all the same size when I plot them.

Any help is highly appreciated! Best Regards.

Frieder Schillinger


回答1:


Weird. It works for me on Ubuntu 10.04 (rgl 0.92.829) [this is my code, I think]. Can you tell us your rgl version? By "plot" do you mean rendering the picture on the screen, or producing PostScript output? This was fixed in the most recent (0.92.829) version:

> 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.



回答2:


?text3d

There is no cex argument. You should be using "scale".



来源:https://stackoverflow.com/questions/9214298/cannot-change-text-size-in-rgl-plot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!