# NOT RUN {
# load the ndvi object of Navarre
data(ex.ndvi.navarre)
# load a spatial polygon object of Navarre
data(ex.navarre)
# show a panel of 4 maps, one per date
# the region of interest is shown in the last map
genPlotGIS(r = ex.ndvi.navarre[[1:4]],
region = ex.navarre,
which = c(4), # show region only in the 4th image
wComp = c(4) # show component only in the 4th image
)
# }
# NOT RUN {
# plot the land surface temperature of the first date available in 2011 in Navarre
# using color palette
library('RColorBrewer')
my.palette <- rev(brewer.pal(n = 9, name = "YlOrRd"))
genPlotGIS(r = ex.ndvi.navarre[[1]],
region = ex.navarre,
proj = CRS("+init=epsg:4670"), # project all components
col.regions = colorRampPalette(my.palette)
)
# }
# NOT RUN {
# change scale text relative Y
genPlotGIS(r = ex.ndvi.navarre[[1:4]],
region = ex.navarre,
proj = CRS("+init=epsg:4670"),
compOpt=list(
# arrow relatives 0-1
ArrowRelativeX = 0.85,
ArrowRelativeY = 0.1,
ArrowRelativeSize = 0.15,
# scale relatives 0-1
scaleRelativeX = 0.1,
scaleRelativeY = 0.1,
scaleRelativeSize = 0.15,
# scale text relatives 0-1
scaleLabelRelativeX = 0.1,
scaleLabelRelativeY = 0.2,
scaleLabelSize = 5000
)
)
# }
Run the code above in your browser using DataLab