无法更改 rgl 图中的文本大小 [英] Cannot change text size in rgl plot

查看:29
本文介绍了无法更改 rgl 图中的文本大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

弗里德·席林格

推荐答案

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

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.

这篇关于无法更改 rgl 图中的文本大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆