Adds a marker and label to the current 3D plot

render_label(heightmap, text, x, y, z, zscale = 1, relativez = TRUE,
offset = 0, textsize = 1, dashed = FALSE, dashlength = "auto",
linewidth = 3, antialias = FALSE, alpha = 1, textalpha = 1,
freetype = TRUE, adjustvec = NULL, family = "sans",
fonttype = "standard", color = "black", textcolor = "black")

Arguments

heightmap A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced. The label text. Text x coordinate in the matrix. Text y coordinate in the matrix. Elevation of the label, in units of the elevation matrix (scaled by zscale). Default 1. The ratio between the x and y spacing (which are assumed to be equal) and the z axis. For example, if the elevation levels are in units Default TRUE. Whether z should be measured in relation to the underlying elevation at that point in the heightmap, or set absolutely (FALSE). Elevation above the surface (at the label point) to start drawing the line. Default 1. A numeric character expansion value. Default FALSE. If TRUE, the label line is dashed. Default auto. Length, in units of the elevation matrix (scaled by zscale) of the dashes if dashed = TRUE. Default 3. The line width. Default FALSE. If TRUE, the line with be have anti-aliasing applied. NOTE: anti-aliasing can cause some unpredictable behavior with transparent surfaces. Default 1. Transparency of the label line. Default 1. Transparency of the label text. Default TRUE. Set to FALSE if freetype is not installed (freetype enables anti-aliased fonts). NOTE: There are occasionally transparency issues when positioning Freetype fonts in front and behind a transparent surface. Default c(0.5,-0.5). The horizontal and vertical offset for the text. If freetype = FALSE and on macOS/Linux, this is adjusted to c(0.33,-0.5) to keep the type centered. Default "sans". Font family. Choices are c("serif", "sans", "mono", "symbol"). Default "standard". The font type. Choices are c("standard", "bold", "italic", "bolditalic"). NOTE: These require FreeType fonts, which may not be installed on your system. See the documentation for rgl::text3d() for more information. Default black. Color of the line. Default black. Color of the text.

Examples

montereybay %>%
#We can also change the linetype to dashed by setting dashed = TRUE (additional options allow
#an absolute height by setting relativez=FALSE.
render_snapshot(clear = TRUE)