Hi Rodrigo,
Did you come across this page?
http://www.cookbook-r.com/Graphs/Legends_(ggplot2)/
See the "Modifying the text of legend titles and labels" heading.
We don't have your data so I can't try to reproduce your exact plot, but here is an example using the built-in iris
dataset:
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point(aes(color = Species)) +
scale_color_discrete(name="Ω")
As you can see, the trick is to use the name
argument in scale_color_discrete()
or in your case since you're using scall_fill_gradient2
to use scale_fill_discrete()
to set the legend title.
Does this do what you need?
Sherif