r - ggplot - change size of dots -
i plotting points on graph ggplot , geom_point. size of dots corresponds magnitude of data point. magnitude goes 2 10. draw dots applying factor of 0.5 magnitude sizes go 1 5. in legend, on side of graph, show real magnitude 2 10.
how can that?
there 2 possibilities:
1) divide magnitude 2:
geom_point(aes(size = magnitude/2))
2) use range = c(1,5)
parameter:
geom_point(aes(size = magnitude)) + scale_size(range = c(1,5))
Comments
Post a Comment