I am plotting data from multiple dataframes in ggplot2 as follows:
# 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)
the legend for colour
includes only entries from iris
, and not from vdf
. how can I make ggplot2 agg a legend from data=vdf
, which in this case would be a gray line below the legend for iris
? thanks.