I want to implement parallel coordinates for my muldimensional result. Does anyone have a good link to its implementation in matlab or R? Furthermore, are there any suggestions regarding the best tool to use for producing the parallel coordinates?
The downside to Parallel Coordinates Plots, is that they can become over-cluttered and therefore, illegible when they're very data-dense. The best way to remedy this problem is through interactivity and a technique known as “brushing”.
A parallel coordinate plot maps each row in the data table as a line, or profile. Each attribute of a row is represented by a point on the line. This makes parallel coordinate plots similar in appearance to line charts, but the way data is translated into a plot is substantially different.
Setting up the Parallel Coordinates plotSelect the XLSTAT / Visualizing data / Parallel Coordinates Plot feature. The Parallel Coordinates Plot dialog box appears. In the General tab, select columns A to D in the Quantitative Data field, column E in the Qualitative Data field and column F in the Groups field.
R solution
lattice package comes with R and includes parallel
function:
parallel(~iris[1:4] | Species, iris)
ggplot2 is also your friend here:
D <- data.frame(Gain = rnorm(20),
Trader = factor(LETTERS[1:4]),
Day = factor(rep(1:5, each = 4)))
ggplot(D) +
geom_line(aes(x = Trader, y = Gain, group = Day, color = Day))
lattice and ggplot require input data in different "shapes". For lattice it's a matrix form, each column is a variable represented on one parallel coordinate. For ggplot it's one column (Gains) and a separate indicator for the variable (Trader above). /this is the reason I used two different examples, not to mess with data reshaping here/.
If you need something quick, then lattice is probably for you. Ggplot requires some time investment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With