Controlling color in ggparcoord (from GGally package)
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).
您应该能够通过添加以下内容将颜色(深绿色)映射到相应的因子级别(绿色):
+ scale_colour_manual(values = c("green" = "darkgreen"))
链接地址: http://www.djcxy.com/p/30934.html