--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
Using your example, what I a trying to do is get the plotting
characters for the variable described in the legend expressed in a
log scale in the original units.
This would be the appearance of the plot I want, except I would like
the legend to be in the original units of engine displacement.
p <- ggplot(mtcars, aes(wt, mpg))
p + geom_point( aes( color = log10(disp), size = log10(disp ) ) )
Sorry of the confusion.
Matt
ggplot(mtcars, aes(wt, mpg)) +
geom_point(aes(color = disp, size = disp)) +
scale_colour_gradient(trans="log10")
ggplot(mtcars, aes(wt, mpg)) +
geom_point(aes(color = disp, size = disp)) +
scale_size(trans="log10")
Or add in a line to take out one of the two legends, either the one for size or colour:
scale_size(legend=F)
scale_colour_gradient(legend=F)
Is there a way to combine color and size attributes into the same legend?
Thanks,
Matt