texts {rgl} | R Documentation |
Adds text to the scene. The text is positioned in 3D space. A bitmap font which is always oriented towards the camera is used.
rgl.texts(x, y = NULL, z = NULL, text, adj = 0.5, justify, ...) text3d(x, y = NULL, z = NULL, texts, adj = 0.5, justify, ...) texts3d(x, y = NULL, z = NULL, texts, adj = 0.5, justify, ...)
x, y, z |
point coordinates. Any reasonable way of defining the
coordinates is acceptable. See the function xyz.coords
for details. |
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. |
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!
The object ID of the text object is returned invisibly.
open3d() text3d(rnorm(10)*100,rnorm(10)*100,rnorm(10)*100,text=1:10,adj = 0.5, color=heat.colors(10))