
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Load required packages | |
library(maptools) | |
library(raster) | |
## Download data from gadm.org | |
adm <- getData('GADM', country='PHL', level=2) | |
mar<-(adm[adm$NAME_1=="Marinduque",])plot(mar, bg="dodgerblue", axes=T) | |
##Plot downloaded data | |
plot(mar, lwd=10, border="skyblue", add=T) | |
plot(mar,col="green4", add=T) | |
grid() | |
box() | |
invisible(text(getSpPPolygonsLabptSlots(mar), labels=as.character(mar$NAME_2), cex=1.1, col="white", font=2)) | |
mtext(side=3, line=1, "Provincial Map of Marinduque", cex=2) | |
mtext(side=1, "Longitude", line=2.5, cex=1.1) | |
mtext(side=2, "Latitude", line=2.5, cex=1.1) | |
text(122.08,13.22, "Projection: Geographic\nCoordinate System: WGS 1984\nData Source: GADM.org\nCreated by: ARSsalvacion", adj=c(0,0), cex=0.7, col="grey20") |
Hi, I would like to know how to plot some values (lets say correlation coeffcient along with color bar) carried out on gridded latitude and longitude. lets say with equal interval of 0.5 x 0.5 degree
ReplyDeleteHi, can you please tell me how to shade color based on some values like proportion / mean etc.? Thank you.
ReplyDelete