Reputation: 59
When I use qplot for a graph and try to change the legend name from "Temp" to "Average Temperature" it.. doesnt change. Do you know what could be wrong with my code:
qplot(Year,
Temp,
data = LithuaniaTemp,
main = "Lithuania Average Temperature 1900-2013",
geom = c("point","smooth")) +
aes(colour = Temp) +
scale_color_gradient(low="blue", high="red") +
theme_fivethirtyeight() +
scale_fill_continuous(guide = guide_legend(title = "Average Temperature"))
Upvotes: 1
Views: 3989
Reputation: 43354
You can use labs
to set the legend title of each variable, e.g.
qplot(hp, disp, colour = factor(cyl), data = mtcars, geom = 'point') +
labs(colour = 'cylinders')
Upvotes: 5