mtext3js {r3js}R Documentation

Add text to the margin of an r3js plot

Description

This is used for example to add axis labels but can also be used for other purposes.

Usage

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

Other plot components: arrows3js(), axis3js(), box3js(), grid3js(), legend3js(), light3js(), lines3js(), points3js(), segments3js(), shape3js(), sphere3js(), surface3js(), text3js(), triangle3js()

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)


[Package r3js version 0.0.2 Index]