I want to show the added line via geom_abline in the legend since the bar chart is denoted in the x axis labels.
How embarrassing, not sure how i forgot toy data. I also cleaned up the example making sure i was running the most up to date version of R and ggplot (and reshape!) I forgot how it can make a difference sometimes
The end product is a bar chart with the added line (indicating the average) with this information showing in the legend, so a red dotted line that says "County Average".
library(ggplot2)
DataToPlot.. <- data.frame(UGB = c("EUG","SPR","COB","VEN"),
Rate = c( 782, 798,858,902))
ggplot(DataToPlot.. ,y = Rate, x = UGB) +
geom_bar(aes(x=UGB,y=Rate, fill = UGB),stat="identity",show.legend = FALSE) +
scale_fill_brewer(palette="Set3") +
geom_abline(aes(intercept = 777, slope = 0), colour = "red",
size = 1.25, linetype="dashed",show.legend = TRUE)