次のように、ggplot2 で複数のデータフレームからデータをプロットしています。
# subset of iris data
vdf = iris[which(iris$Species == "virginica"),]
# plot from iris and from vdf
ggplot(iris) +
geom_line(aes(x=Sepal.Width, y=Sepal.Length, colour=Species)) +
geom_line(aes(x=Sepal.Width, y=Sepal.Length), colour="gray", size=2,
data=vdf)
の凡例には、 からではなく からのcolour
エントリのみが含まれます。ggplot2 agg を の凡例にするにはどうすればよいですか? この場合、 の凡例の下の灰色の線になりますか? ありがとう。iris
vdf
data=vdf
iris