mtext3js.Rd
This is used for example to add axis labels but can also be used for other purposes.
mtext3js(data3js, text, side, line = 0, at = 0.5, cornerside = "f", ...)
The data3js object
The margin text
The axis side, either "x", "y" or "z"
The number of lines away from the plot edge
Position along the plot edge, defaults to 0.5 (middle)
See material3js()
Other arguments to pass to material3js()
Returns an updated data3js object
Other plot components:
arrows3js()
,
axis3js()
,
box3js()
,
grid3js()
,
legend3js()
,
light3js()
,
lines3js()
,
points3js()
,
segments3js()
,
shape3js()
,
sphere3js()
,
surface3js()
,
text3js()
,
triangle3js()
# Create a blank plot
p <- plot3js.new()
p <- box3js(p)
# Add some margin text
p <- mtext3js(p, "0.5m", side = "x")
p <- mtext3js(p, "0.25m", side = "x", at = 0.25, line = 1)
p <- mtext3js(p, "1m", side = "y", at = 1, line = 2)
r3js(p)