dkahle / ggmap

A package for plotting maps in R with ggplot2
763 stars 231 forks source link

Add transparency to maps #325

Open datawookie opened 2 years ago

datawookie commented 2 years ago

Adds a set_map_alpha() function which appends an alpha channel onto a map. This allows superimposing maps with transparency.

I've included a simple test too.

For example (maps from the examples included with the function):

A 100% opaque map of London

image

Another 100% opaque map of London

image

The second map superimposed with 25% opacity

image

The function documentation includes the code required to produce the above maps.