l_pairs.Rd
Function creates a scatterplot matrix using loon's scatterplot widgets
l_pairs(data, linkingGroup, linkingKey, showItemLabels = TRUE, itemLabel, showHistograms = FALSE, histLocation = c("edge", "diag"), histHeightProp = 1, histArgs = list(), showSerialAxes = FALSE, serialAxesArgs = list(), parent = NULL, ...)
data | a data.frame with numerical data to create the scatterplot matrix |
---|---|
linkingGroup | string giving the linkingGroup for all plots. If missing,
a default |
linkingKey | a vector of strings to provide a linking identity for each row of the
|
showItemLabels | TRUE, logical indicating whether its itemLabel pops up over a point when the mouse hovers over it. |
itemLabel | a vector of strings to be used as pop up information when the mouse hovers
over a point. If missing, the default |
showHistograms | logical (default FALSE) to show histograms of each variable or not |
histLocation | one "edge" or "diag", when showHistograms = TRUE |
histHeightProp | a positive number giving the height of the histograms as a proportion of the height of the scatterplots |
histArgs | additional arguments to modify the `l_hist` states |
showSerialAxes | logical (default FALSE) indication of whether to show a serial axes plot in the bottom left of the pairs plot (or not) |
serialAxesArgs | additional arguments to modify the `l_serialaxes` states |
parent | parent widget path |
... | named arguments to modify the `l_plot` states of the scatterplots |
an `l_pairs` object (an `l_compound` object), being a list with named elements, each representing a separate interactive plot. The names of the plots should be self explanatory and a list of all plots can be accessed from the `l_pairs` object via `l_getPlots()`. All plots are linked by default (name taken from data set if not provided). Panning and zooming are constrained to work together within the scatterplot matrix (and histograms).
l_plot
and l_getPlots
p <- l_pairs(iris[,-5], color=iris$Species, linkingGroup = "iris") p <- l_pairs(iris[,-5], color=iris$Species, linkingGroup = "iris", showHistograms = TRUE, showSerialAxes = TRUE) # plot names names(p)#> [1] "x2y2" "x3y2" "x4y2" "x3y3" "x4y3" #> [6] "x4y4" "x2y1" "x3y1" "x4y1" "x5y2" #> [11] "x5y3" "x5y4" "serialAxes"# Each plot must be accessed to make changes not managed through # linking. # E.g. to change the glyph on all scatterplots to open circles for (plot in l_getPlots(p)) { if (is(plot, "l_plot")) { plot["glyph"] <- "ocircle"} }