r - Is it possible to change the default color of the items in scale_size in ggplot2? -


i change default color of scale_size_manual() in ggplot2 independent of type of data in dataframe.

is possible?

for example of items in size legend of color "red".

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 not american spelling of color. might have track down , submit small patch...


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -