Creating a scale bar for a mapLaura TwardochlebSeptember 21, 2016Here I have modified a function to create a scale bar for a map. I will use an example map of black bear occurrences in the northeastern United States. The original code for the scale bar function was written by eipi10 at http://stackoverflow.com/questions/23784943/how-to-add-a-scale-bar-in-r
I will create the map of the northeast region and plot black bear occurrence data from GBIF (Global Biodiversity Information Facility) using the ‘raster’ library.
The above code produced a map with 100 km x 100 km resolution of bear occurrence data. Now I will add a custom scale bar illustrating 100 km on the map.
0 Comments
Leave a Reply. |
Spatial Ecology @ MSUClick on "Category" below to search for R code compiled by the Zarnetske Spatial & Community Ecology Lab and students in MSU's Spatial Ecology graduate course (FOR870/FW870) Category
All
Archive
October 2016
|