parallel coordinate plot
1
0
Entering edit mode
3 months ago
Rob ▴ 40

Hi friends I wanna plot a parallel coordinate doiagram. I want one of the lines (row number 60) to be in different color. How can I do it? I have 269 rows and 10 columns This is my code:

parcoords(
    data[,1:10],
    reorderable = F,
    brushMode = '1D-axes', color = "red")

This is the plot I have:

Plot

R • 200 views
ADD COMMENT
0
Entering edit mode
3 months ago

Define a 60-element array containing the color assignments that you want. 59 elements will be of one color. One element will be of another. This link should get you started with the general idea: https://thomaspun12.wordpress.com/2016/07/01/r-parallel-co-ordinate-plot-using-rainbow-colours/

ADD COMMENT
0
Entering edit mode

Hi Alex Thanks for responding I did not understand and cannot get result from the link you sent. Is there any other solution for this?

ADD REPLY
0
Entering edit mode

You have to pass the R command an array of colors, as a parameter when making the plot. In this array, 59 entries are of one color. The 60th value is another color. That's really all there is to it. There's no magic here. Try out the sample in the link so that you understand how it works, and then manipulate it to try to get to the result you want. That's a good way to learn.

ADD REPLY

Login before adding your answer.

Traffic: 1809 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6