Creates an interactive 3d scatterplot. Also, if no loon inspector is open then the l_plot3D call will also open a loon inspector.

# S3 method for default
l_plot3D(x, y = NULL, z = NULL,
  axisScaleFactor = 1, color = "grey60", glyph = "ccircle",
  size = 4, active = TRUE, selected = FALSE, xlabel, ylabel, zlabel,
  title, showLabels = TRUE, showScales = FALSE, showGuides = TRUE,
  guidelines = "white", guidesBackground = "grey92",
  foreground = "black", background = "white", parent = NULL, ...)

Arguments

x

the x, y and z arguments provide the x, y and z coordinates for the plot. Any reasonable way of defining the coordinates is acceptable. See the function xyz.coords for details.

If supplied separately, they must be of the same length.

y

the y coordinates of points in the plot, optional if x is an appropriate structure.

z

the z coordinates of points in the plot, optional if x is an appropriate structure.

axisScaleFactor

the amount to scale the axes at the centre of the rotation. Default is 1. All numerical values are acceptable (0 removes the axes, < 0 inverts the direction of all axes.)

color

colours of points; colours are repeated until matching the number points,

glyph

shape of point; must be one of the primitive glyphs "circle", "ccircle", "ocircle", "square", "csquare", "osquare", "triangle", "ctriangle", "otriangle", "diamond", "cdiamond", or "odiamond".

Prefixes "c" and "o" mean closed and open, respectively. Default is "ccircle" meaning a closed circle glyph.

Non-primitive glyphs such as polygons, images, text, point ranges, and even interactive glyphs like serial axes glyphs may be added, but only after the plot has been created.

size

size of the symbol (roughly in terms of area)

active

a logical determining whether points appear or not (default is TRUE for all points). If a logical vector is given of length equal to the number of points, then it identifies which points appear (TRUE) and which do not (FALSE).

selected

a logical determining whether points appear selected at first (default is FALSE for all points). If a logical vector is given of length equal to the number of points, then it identifies which points are (TRUE) and which are not (FALSE).

xlabel

Label for the horizontal (x) axis. If missing, one will be inferred from x if possible.

ylabel

Label for the vertical (y) axis. If missing, one will be inferred from y (or x) if possible.

zlabel

Label for the third (perpendicular to the screen) (z) axis. If missing, one will be inferred from z (or x) if possible.

title

Title for the plot, default is an empty string.

showLabels

logical to determine whether axes label (and title) should be presented.

showScales

logical to determine whether numerical scales should be presented on both axes.

showGuides

logical to determine whether to present background guidelines to help determine locations.

guidelines

colour of the guidelines shown when showGuides = TRUE (default "white").

guidesBackground

colour of the background to the guidelines shown when showGuides = TRUE (default "grey92").

foreground

foreground colour used by all other drawing (default "black").

background

background colour used for the plot (default "white")

parent

a valid Tk parent widget path. When the parent widget is specified (i.e. not NULL) then the plot widget needs to be placed using some geometry manager like tkpack or tkplace in order to be displayed. See the examples below.

...

named arguments to modify plot states.

Details

The scatterplot displays a number of direct interactions with the mouse and keyboard, these include: rotating, zooming towards the mouse cursor using the mouse wheel, panning by right-click dragging and various selection methods using the left mouse button such as sweeping, brushing and individual point selection. See the documentation for l_plot3D for more details about the interaction gestures.

See also

Other three-dimensional plotting functions: l_plot3D, l_scale3D

Examples

# default use as scatterplot p1 <- with(quakes, l_plot3D(long, lat, depth) ) p2 <- with(quakes, l_plot3D(mag, stations, depth) ) # link the two plots p1 and p2 l_configure(p1, linkingGroup = "quakes", sync = "push") l_configure(p2, linkingGroup = "quakes", sync = "push")