1

I am trying to hard-code the desired line color for a particular ggparcoord plot. For instance, when I create my ggparcoord plot below:

library(GGally)
x = data.frame(a=runif(100,0,1),b=runif(100,0,1),c=runif(100,0,1),d=runif(100,0,1))
x$cluster = "green"
x$cluster2 = factor(x$cluster)
ggparcoord(x, columns=1:4, groupColumn=5, scale="globalminmax", alphaLines = 0.99) + xlab("Sample") + ylab("log(Count)")

Even though I try to specify a color of "green", I get a pink color. How can I control the color of the lines in ggparcoord? (By the way, I want all lines the same color as I specify).

zx8754
  • 52,746
  • 12
  • 114
  • 209

1 Answers1

2

You should be able to map the colour (darkgreen) to a corresponding factor level (green) by adding:

+ scale_colour_manual(values = c("green" = "darkgreen"))
lukeA
  • 53,097
  • 5
  • 97
  • 100