6
ggplotの塗りの凡例からカラーラインを削除したい。私は通常、伝説の美学を変更するのにguide_legend(override.aes = ...)
を使用します - 点、線、アルファなどのためにはうまくいきますが、私のcolor
審美的には機能しません。私は間違って何をしていますか?凡例の色を変更するのにoverride.aesを使用できないのはなぜですか?
# generate data
set.seed(47)
data = data.frame(year = rep(2000:2004, 3),
value = runif(15),
group = rep(c("A", "B", "C"), each = 5))
# create the plot
p = ggplot(data, aes(x = year, y = value, fill = group)) +
geom_area(position = position_fill(), color = "white") +
scale_fill_grey()
# this should modify the fill legend to remove the colored line
# but the line is still there
p + guides(fill = guide_legend(override.aes = list(color = NA)))
それはDEVバージョンですでに変更されています:
u
を追加するとうまくoverride.aes
作業を行います。 – joran"ggplout2" -hadley – rawr
私は[私の一見単純な答え](http://stackoverflow.com/questions/28694969/add-separate-legend-for-home)を書いたときに、この問題に関して私の机の上で私の頭を強く叩いていました。 geom-vline/28696738#28696738)once ... – Henrik