Splits the active rgl device into two subscenes (the main plot and a color-bar legend) and draws, in the legend subscene, a continuous color scale together with its corresponding values.
Usage
splot3d(
slim = c(0, 1),
col = jet.colors(128),
legend.zoom = 0.4,
legend.width = 0.1,
legend.dim = 0.2,
legend.lab = NULL,
box = TRUE,
lab.breaks = NULL,
lab.ticksize = 0.5,
lab.dist = 3,
...
)Arguments
- slim
limits (vector of length 2 with the minimum and maximum) used to set up the color scale.
- col
color table used to set up the color scale. Defaults to
jet.colors(128).- legend.zoom
zoom factor applied to the legend subscene (see
rgl::view3d()).- legend.width
relative width of the color bar, as a fraction of the corresponding dimension of the legend subscene/panel.
- legend.dim
relative dimension of the legend panel, as a fraction of the full width (or height) of the device.
- legend.lab
legend title.
- box
logical; if
TRUE(the default) a rectangle is drawn around the color bar.- lab.breaks
labels for the legend axis breaks; if
NULLthey are generated automatically (seeaxis3()).- lab.ticksize
length of the legend axis tick marks, as a fraction of the distance to the center of the legend panel.
- lab.dist
distance between the tick marks and the labels of the legend axis, as a multiple of
lab.ticksize.- ...
additional arguments passed to
axis3().
Value
Invisibly returns the identifiers of the created subscenes (see
rgl::layout3d()).
Details
Mouse rotation is disabled in the legend subscene.
Furthermore, since rgl::layout3d(..., mouseMode = "replace") does not
copy the user's mouse handlers (which are therefore disabled), the first one
is set up for trackball with double click to reset view (via dbltrack3d()),
and the second one (if any) for panning (via pan3d()).