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", ...)

Arguments

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 material3js()

...

Other arguments to pass to material3js()

Value

Returns an updated data3js object

See also

Examples

# 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)