Learn R Programming

sdtoolkit (version 2.33-1)

scatterbox: Plot scatterplots of data with boxes shown

Description

Function for plotting scatterplots of cases, with points color-coded by relevance and with two-dimensional projections of scenarios-as-boxes.

Usage

scatterbox(boxseq, boxnum = 1, xdim, ydim, filterdims = FALSE, 
  filterothers = FALSE, nobox = FALSE, addbox = FALSE, 
  data = attr(boxseq, "data"), y = NULL, manualbox = FALSE, ...)

Arguments

boxseq
A box sequence object as ouput by sdprim. Alternatively, a manually created list of box definitions (see details.
boxnum
Integer - Which box in the box sequence should be plotted?
xdim
Integer or Character - Which dimension should be plotted as the x-axis? The safest way is to specify the dimension name. See details.
ydim
Integer or Character - Which dimension should be plotted as the y-axis? The safest way is to specify the dimension name. See details.
filterdims
Logical - If a box is defined by more than just the two dimensions that are being plotted, should points filtered out by the other dimensions be removed from the scatter plot? See details.
filterothers
Specifies whether and how points captured by other boxes should be filtered out. Either TRUE, FALSE, PREV or a vector of numerics. TRUE removes points captured by all other boxes. FALSE removes none. PREV removes any
nobox
Logical - should the scatterplot be generated, but with no box plotted?
addbox
Logical - should a different box be plotted on the same scatterplot? Note that depending on how points were filtered and which dimensions are involved, this may or may not be misleading.
data
Matrix - the data to use in generating the scatterplots. The default is to use the data attribute returned by sdprim. If this is not used for some reason (such as training versus test data), the dataset should have the same number of dimensions, same di
y
Vector of zeros and ones indicating interestingness or uninterestingness of points. If left as NULL, it will assume the item data above is of the form returned by sdprim.
manualbox
Logical - Is the boxseq argument given a manually generated box list not conforming to the output of sdprim? This may be handy if you want to plot boxes or box sequences that you specified yourself independent of sdprim
...
Arguments that may be passed on to pbox and colptplot.

Value

  • Nothing returned, used for its plotting capabilities.

References

RAND Pardee Center: http://www.rand.org/international_programs/pardee/

Examples

Run this code
data(exboxes)
scatterbox(exboxes,xdim="stations",ydim="depth")

Run the code above in your browser using DataLab