Skip to contents

Set Up a Three-Dimensional Scatter Configuration

Usage

setup_Scatter3DConfig(
  x = NULL,
  y = NULL,
  z = NULL,
  group = NULL,
  alpha = 20,
  beta = 40,
  view_size = 190,
  point_size = 8,
  opacity = NULL,
  xlab = NULL,
  ylab = NULL,
  zlab = NULL,
  palette = NULL,
  title = NULL,
  dat_path = NULL,
  origin = NULL,
  writer = NULL,
  mode = "points",
  order = "input",
  line_width = 2,
  fit = NULL,
  fit_params = NULL,
  n_fit = 25L,
  fit_alpha = 0.35,
  projection = "perspective",
  distance = 250
)

Arguments

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

Optional Numeric [0, 1]: Point and line opacity. NULL sets it from the number of complete observations, as in draw_scatter()'s point_alpha, and draws paths alone (mode = "lines") opaque.

xlab, ylab, zlab

Optional Character: Axis names.

palette

Optional Character: Group colors.

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.

dat_path

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

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.

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.

fit

Optional Character: Model of z on x and y drawn as a surface per group: "glm", "gam", or an rtemis supervised learning algorithm name such as "LINAD", which requires the rtemis package (>= 1.4.1). See draw_scatter(). NULL draws no surface.

fit_params

Optional Named list: Arguments passed to the learner named in fit. See draw_scatter().

n_fit

Integer [2, Inf): Grid points per axis for fitted surfaces.

fit_alpha

Numeric [0, 1]: Opacity of fitted surfaces.

projection

Character {"perspective", "orthographic"}: Camera projection.

distance

Numeric [100, 400]: Perspective camera distance from the center of the 100-unit cube. Narrow and portrait layouts increase the distance to preserve space for axes.

Value

Scatter3DConfig: Validated settings.

Examples

draw(setup_Scatter3DConfig(x = "Sepal.Length", y = "Sepal.Width",
  z = "Petal.Length", group = "Species"), data = iris)