Skip to content

Parallel coordinates plot

Yihui Xie edited this page Dec 18, 2010 · 1 revision

Parallel Coordinates Plot

See details in the R documentation.

Features

What qparallel() can do now:

Static display

  1. select a number of variables to show via variable names (character) or formula (e.g. ~ x1 + x2);
  2. 3 standardizing methods, I, range and var; or the users can define their own functions to standardize data;
  3. accept colors for each observation from the mutaframe (.color column);
  4. draw either horizontal or vertical plots;
  5. add boxplots of each variable to the par-coords plot (with widths specified or using default values); no boxplots for non-numeric columns (does not make sense for character or logical columns);
  6. jitter one or more variables (with a specified amount);
  7. specify margin widths (between the main plot region and the axes);
  8. center/anchor all the axes at specified locations, e.g. force all axes align at their medians (think Tukey's rootgrams);
  9. handle missing values; impute by 20%-below-the-minimum by default;
  10. use points (can specify different glyphs) in case of large data (n*p>50000) instead of complete lines for all rows
  11. order variables by MDS: similar variables will be arranged nearer to each other
  12. automatically break axis tick labels which contain non-alphanumeric characters (replace them by '\n' to break into multiple lines)

Dynamic display

  1. left-click and drag to move the brush;
  2. right-click to resize the brush;
  3. selection sequences by key modifiers; we can select some objects by a certain condition in one plot, and go to the other plot to select objects that meet both conditions (intersection);
    • A: and, intersection
    • O: or, union
    • N: not, flip
    • X: xor, toggle
    • C: complement
  4. show the data labels and the row ids (obtained from rownames(qdata))
  5. record the brush history (can go back and forth -- use the key PageUp and PageDown)
  6. switch the order of variables (i.e. move an axis or several axes left/right/up/down) and flip the values of a variable using the arrow keys
    • when the plot is horizontal: left <--; right -->; up or down: flip values
    • vertical plots: left or right: flip values; up similar to right in horizontal plots; down similar to left

Since the plots are in a pipeline, modifications to the data or the brushing attributes can be reflected in all the plots immediately.

Demos

Data on the original scale:

Standardize to [0, 1]:

Center at medians:

Linked views:

use points instead of whole lines

iris:

residential data: 18221x8

Movies:

TODO

  • [done] ordering variables: the R package [[seriation|http://cran.r-project.org/package=seriation]] might be a good place to look at
    • I decided to implement classical MDS only; I don't want to include all the functionalities in seriation (it does not sense to do so either)
  • flip variables
  • show labels when hover
  • [in progress] packaging
  • manually switching variable orders (e.g. use arrow keys)
  • [done] brushing history: can be stored in a mutalist
  • color palettes
  • point glyphs?
  • faceting?