Reputation: 1068
I would like to change the default color of the scale_size_manual()
in ggplot2
independent of the type of the data in the dataframe.
Is this possible?
For example I would like all of the items in the size legend to be of color "red"
.
Upvotes: 0
Views: 556
Reputation: 173627
Try this:
> p <- ggplot(mtcars,aes(x = mpg,y = disp,size = cyl)) + geom_point()
> p + scale_size_continuous(guide = guide_legend(override.aes = list(colour = "red")))
Oddly, override.aes
seems to not like the American spelling of color
. Might have to track that down and submit a small patch...
Upvotes: 2