texts {rgl}R Documentation

add text

Description

Adds text to the scene. The text is positioned in 3D space. A bitmap font which is always oriented towards the camera is used.

Usage

rgl.texts(x, y, z, text, adj = 0.5, justify, ...)
text3d(x, y, z, texts, adj = 0.5, justify, ...) 
texts3d(x, y, z, texts, adj = 0.5, justify, ...) 

Arguments

x, y, z point coordinates
text text character vector to draw
texts text character vector to draw
adj one value specifying the horizontal adjustment
justify (deprecated, please use adj instead) character string specifying the horizontal adjustment; options are "left", "right", "center".
... Material properties. See rgl.material for details.

Details

The adj parameter determines the position of the text relative to the specified coordinate. Use adj = 0 to place the left bottom corner at (x,y,z), adj = 0.5 to center the text there, and adj = 1 to put the right bottom corner there.

text3d and texts3d draw text using the r3d conventions. These are synonyms; the former is singular to be consistent with the classic 2-D graphics functions, and the latter is plural to be consistent with all the other graphics primitives. Take your choice!

See Also

r3d

Examples

text3d(rnorm(10)*100,rnorm(10)*100,rnorm(10)*100,text=1:10,adj = 0.5, color=heat.colors(10))

[Package rgl version 0.65 Index]