mtext3js | R Documentation |
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", ...)
data3js |
The data3js object |
text |
The margin text |
side |
The axis side, either "x", "y" or "z" |
line |
The number of lines away from the plot edge |
at |
Position along the plot edge, defaults to 0.5 (middle) |
cornerside |
See |
... |
Other arguments to pass to |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.