0

I am trying to use MASS parcoord (R) to illustrate a dataset with ~2000 rows (observations) with 11 variables and 7 factors to which I assign colours. I have 2 problems with the graphical output:

  1. the font size of variable names are too large and would like to half them. I am using the code:
parcoord(data[,3:13], col=data$K7a, var.label=TRUE) # factors are in column K7a, variables are in cols 3:13
  1. Then I want to highlight one of these factor, keeping the other factors in the background with a light colour or make them invisible, or transparent. I use the following:
K2 <- ifelse(data$K7a=="2","red","white" )  # i want to highlight Factor 2
parcoord(data[,3:13] , col=K2 )

but the red lines are masked by the white ones in some part of the graph, that look like they are in the foreground and the red lines go to the background. How can I overcome this problem ? I used "NULL" to replace "white"but doesn't solve the problem.

Nicko
  • 350
  • 2
  • 9
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Aug 27 '20 at 21:26
  • I get the following message when trying to install matplot "package ‘matplot’ is not available (for R version 4.0.2 Patched)" and is also valis for R 3.6 – Maria Eugenia D'Amato Aug 28 '20 at 14:33
  • I’m confused. Why are you trying to install a package named `matplot`? As far as I can tell there isn’t one. There is a function called `matplot` in the default graphics package. But I don’t see how that’s related to your question. – MrFlick Aug 28 '20 at 15:49

0 Answers0