[R] greek letters in rgl plot3d

Duncan Murdoch murdoch.duncan at gmail.com
Fri Jul 23 13:54:04 CEST 2010


On 23/07/2010 7:39 AM, james.foadi at diamond.ac.uk wrote:
> Dear RGL experts,
> I haven't been able to add greek letters to my rgl plot3d.
> I have tried "expression" with no success.
>
> Here is the interested bit:
>
> > library(rgl)
> > cb <- cube3d()
> > plot3d(cb,xlab=expression(alpha),ylab="",zlab="",box=FALSE,alpha=0.5)
>
> The expression(alpha) appears as "alpha", rather than as a greek symbol.
> I suspect greek and mathematical symbols in general can be added to a plot3d
> in rgl. Is that true?
>   

You can probably add the symbols if you choose a font that contains 
them, but there is no support for the plotmath mechanism that's in the 
standard graphics system.

I think the best you could do would be to typeset the label into a 
bitmap, then display it as a sprite or texture in rgl.

Adding plotmath support to rgl is something that would be really 
interesting, but quite difficult. 

Duncan Murdoch
> J
>
> Dr James Foadi PhD
> Membrane Protein Laboratory (MPL)
> Diamond Light Source Ltd
> Diamond House
> Harewell Science and Innovation Campus
> Chilton, Didcot
> Oxfordshire OX11 0DE
>
> Email    :  james.foadi at diamond.ac.uk
> Alt Email:  j.foadi at imperial.ac.uk
>
>
>



More information about the R-help mailing list