R ggplot2 change scale to log

June 2, 2010 by
Filed under: Notes 

Use “trans” argument in scale_[type]_gradient function.

E.g: for scale_fill_gradient
ggplot(data = cleandatazip) + geom_boxplot(aes(x = State, y = losssevresid, color = beltindicator, fill = liqinstate)) + scale_fill_gradient(low = 1, high = 0,trans = "log10")


Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!