I am trying to map color variable to geom_hline, but doesn't seem to work like other geometries. Neither of these work, in each case, rendering a fixed black line.
ggplot(data.frame(x=0,y=0,series="ABC"),aes(x,y,color=series))) +
geom_point() +
geom_hline(yintercept=0,show.legend = TRUE)
ggplot(data.frame(x=0,y=0),aes(x,y)) +
geom_point() +
geom_hline(yintercept=0,aes(color="ABC"),show.legend = TRUE)
Is this a bug, or is there some syntax I am missing?