#

## Parallel Coordinate Plots

We can use the parcoord function in MASS to create parallel coordinate plots, e.g., `doc = svgPlot(parcoord(mtcars))` We end up with an SVG document that has essentially 5 components: `g = xmlRoot(doc)[["g"]] names(g) rect g g g g "rect" "g" "g" "g" "g"` The number of elements in each is `xmlSApply(g, xmlSize) rect g g g g 0 1 31 23 11` The first `g` element is the initial line segment for the first observation. The second `g` element is the remaining line segments. We can verify this in several ways, including finding its shape object. `sh = getShape(g[[3]][[1]]) sh` This has 12 elements corresponding to a move command and the 11 variables. The 31 children of the the `g` element correspond to the 31 observations remaining in the data frame after the initial one. The next `g` element contains the components that make up the horizontal axis, i.e. the horizontal line, the vertical tick marks and the text. The last element contains the 11 vertical grey lines that appear in the data region to mark the variables.

## Boxplots

We'll look at regular boxplots with one and more than one variables in the plot, with and without notches. We start by creating a simple data set with two variables: `dd = list(a = c(rnorm(100), rnorm(10, 3)), b = rnorm(400))` Now we create a boxplot with just one variable: `doc1 = svgPlot(boxplot(dd$a))` The main `g` element has three elements: `names(xmlRoot(doc1)[["g"]]) rect g g "rect" "g" "g"` `xmlSApply(xmlRoot(doc1)[["g"]], xmlSize) rect g g 0 14 12`