Search code examples
rggplot2polygonsggmap

ggmap package plot filled polygon on map


For days i'm searching on the web the most simple way to plot a shaded polygone above a map generated with the get_map command. For the polygone I have a few (latitudes, longitudes) points.

I know how to do this with *.shp files must it's too much time consuming for simple applications.

If someone has a good tip to do this with in a simple way with R 3.0.2 ;-)


Solution

  • You can use geom_polygon to draw a polygon. Try to add the following command to your plot:

    + geom_polygon(data = yourdata, aes(x = lon, y = lat))