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).

4

1 回答 1

2

您应该能够通过添加以下内容将颜色(深绿色)映射到相应的因子级别(绿色):

+ scale_colour_manual(values = c("green" = "darkgreen"))
于 2015-04-24T14:32:53.263 回答