Watercolor your lakes in R

All lakes are beautiful. Or at least when they’re coded in watercolor!


For this you will need to install and load ggmap. I am a huge Hadley Wickham fan (obvs), but am not usually a proponent of plotting packages. I love base. However, you can’t beat this one.

install.packages('ggmap') library(ggmap)

You will need two customize two things:
1) Lat/long <- The center of your map in decimal degrees
2) Zoom <- Must be an integer. This is frustrating with small scale maps. Like the Great Lakes

qmap(c(-94.542155,49.3938), zoom=9, source = "stamen", maptype = "watercolor")

To plot figure without axes, set extent to ‘device. Now output your figure and put it on your fridge! Or your phone wallpaper.

png('mylake.png',width=4,height=4,units='in',res=300) mylake=get_map(c(-94.542,49.393), zoom=9, source = "stamen", maptype = "watercolor") ggmap(mylake,extent = "device") dev.off()


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s