0

I have plot a graph and wanted to add legends to that graph and I used the following code,

print(ggmap(m) + geom_point(aes(x=longitude, y=latitude, size= code, color=ifelse(value < 30, 'red',ifelse(value >55, 'green', 'blue') )), pch = 20, data=combined1) + 
    scale_color_identity() + 
    scale_colour_manual(name = 'legend', values =c('blue'='blue','red'='red', 'green'='green'), labels = c('Between 30 - 55','Less than 30','Greater than 55')))

But the size of the dots in the legends is very small. It's very minuscule. The following is the image I am getting,

enter image description here

Can anybody tell a technique to increase the size of the dots in the legend, so that it would have more sense. I have searched through many posts and was not able to find any.

Any help would be appreciated.

Thanks

Observer
  • 641
  • 2
  • 14
  • 31
  • having `dput` of `m`, or a subset of it, would allow us to [reproduce](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610) your graph/problem ;) – Vincent Bonhomme Apr 01 '16 at 18:44
  • 1
    Possible dupe: http://stackoverflow.com/q/31867837/903061. The question is slightly more complicated but the solution should work (without the alpha) – Gregor Thomas Apr 01 '16 at 18:45
  • @VincentBonhomme Apologies for this. i thought this might be some small function or something which can be added to this. So only didn't put a reproducable problem. May be I will edit the question now – Observer Apr 01 '16 at 18:46
  • `+ guides(colour =guide_legend(override.aes=list(size=5)))` may do what you want indeed – Vincent Bonhomme Apr 01 '16 at 18:51
  • 1
    @Observer the thing with non-reproducible problems is that the answerer *can't be sure it works*. Often we can make a good guess, but the default should always be reproducible questions. – Gregor Thomas Apr 01 '16 at 18:51

0 Answers0