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:

R • 200 views
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/

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?

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.