Skip to contents

Uses ECharts-GL Scatter3DSeries, Grid3DModel, Cartesian3D, and OrbitControl. Coordinates are independently scaled to equal box dimensions. The camera is orthographic: parallel lines remain parallel and exported point positions match the configured browser view. Browser rotation/zoom is interactive; saving the R widget exports its configured initial camera.

Usage

Scatter3DConfig(
  dat_path = NULL,
  title = NULL,
  origin = NULL,
  writer = NULL,
  x = NULL,
  y = NULL,
  z = NULL,
  group = NULL,
  alpha = 20,
  beta = 40,
  view_size = 190,
  point_size = 8,
  opacity = 0.8,
  mode = "points",
  order = "input",
  line_width = 2,
  xlab = NULL,
  ylab = NULL,
  zlab = NULL,
  palette = NULL
)

Arguments

dat_path

Optional Character: Path to the data, read at draw time. The serializable alternative to passing data to draw().

title

Optional Character: Chart title. Declared here because it is the one property every chart type has; palette is not (four take a colormap instead), and axis labels and margins are cartesian-only.

origin

Optional Named character {"user", "default", "derived"}: Where each value came from, one entry per settable property. Absent on an authored config; written by the interface that resolved it.

writer

Optional Named character: Which interface wrote the config, as name and version. Absent on an authored config.

x, y, z

Optional Character: Numeric coordinate column bindings.

group

Optional Character: Group column binding.

alpha

Numeric [-80, 80]: Camera elevation in degrees.

beta

Numeric [-180, 180]: Camera azimuth in degrees.

view_size

Numeric [175, 400]: Orthographic viewing extent for a 100-unit cube.

point_size

Numeric (0, 100]: Marker diameter in pixels.

opacity

Numeric [0, 1]: Point and line opacity.

mode

Character c("points", "lines", "both"): Geometry to draw.

order

Character c("input", "x"): Order within complete path runs. Missing coordinates break paths; sorting never joins across those breaks.

line_width

Numeric (0, 100]: Path width in pixels.

xlab, ylab, zlab

Optional Character: Axis names.

palette

Optional Character: Group colors.

Value

Scatter3DConfig: Validated portable settings.

Examples

setup_Scatter3DConfig(x = "Sepal.Length", y = "Sepal.Width", z = "Petal.Length")
#> <rtemis.draw::Scatter3DConfig>
#>  @ type      : chr "scatter3d"
#>  @ dat_path  : NULL
#>  @ title     : NULL
#>  @ origin    : Named chr [1:18] "default" "default" "user" "user" "user" "default" ...
#>  .. - attr(*, "names")= chr [1:18] "dat_path" "title" "x" "y" ...
#>  @ writer    : NULL
#>  @ x         : chr "Sepal.Length"
#>  @ y         : chr "Sepal.Width"
#>  @ z         : chr "Petal.Length"
#>  @ group     : NULL
#>  @ alpha     : num 20
#>  @ beta      : num 40
#>  @ view_size : num 190
#>  @ point_size: num 8
#>  @ opacity   : num 0.8
#>  @ mode      : chr "points"
#>  @ order     : chr "input"
#>  @ line_width: num 2
#>  @ xlab      : NULL
#>  @ ylab      : NULL
#>  @ zlab      : NULL
#>  @ palette   : NULL