Lab9S ShafferNovember 12, 2015Lab 9 ***************************************************************************************R Trick/Snippet How to color a polygon and change border thickness For color changes, see: http://gis.stackexchange.com/questions/36877/how-do-i-change-the-polygon-fill-color-and-border-color-for-spatialpolygons-obje For border thickness, see: http://stackoverflow.com/questions/18994051/how-to-set-line-width-and-color-when-plotting-a-shapefile-with-plot Install packages (i.e., these are only needed for downloading the data in this example):
Download polygon data. In this case, the polygon I will use is a US state border.
Plot a polygon
Replot the polygon, but with color and with different border thickness. col=“[name of color]” changes the interior. border=“[name of color]” changes the border color. lwd=[#] changes the border thickness. (For lwd, the default is 1.)
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
|