使用“表达式"在 R rgl 轴标签中 [英] Using "expression" in R rgl axis labels

查看:22
本文介绍了使用“表达式"在 R rgl 轴标签中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

rgl 例程是否接受使用希腊字母的表达式"和轴标签的超级/下标?

Do the rgl routines accept the use of "expression" for Greek letters and super/sub script for axis labelling?

类似的东西

xlab=(expression(paste("Lyman ",alpha,)))

在普通绘图调用中运行良好,但似乎在 plot3d 和decorate3d 中显示(paste("Lyman ",alpha,)" 作为我的轴标签.如果没有,我如何将这些字符添加到我的 3D 散点图中使用 plot3d 生成?

works perfectly well in a normal plot call but just seems to display "(paste("Lyman ",alpha,)" as my axis label in plot3d and decorate3d. If not, how can I add these characters to my 3D scatterplots generated using plot3d?

推荐答案

在我的系统 (OSX 10.7.5, R 3.1.2) 上,我得到了一个 alpha 作为 xlab:

On my system (OSX 10.7.5, R 3.1.2) I get an alpha as xlab with:

require(rgl)
plot3d(1,1,1,xlab=intToUtf8(0x03B1L) )

粘贴到普通文本也成功:

And pasting to ordinary text also succeeds:

plot3d(1,1,1, xlab=paste("Lyman ", intToUtf8(0x03B1L) ) )

这篇关于使用“表达式"在 R rgl 轴标签中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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