-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotFunctions.R
More file actions
20 lines (18 loc) · 730 Bytes
/
plotFunctions.R
File metadata and controls
20 lines (18 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
plotStudyArea <- function(polygon, points){
plot <- tm_shape(lake_spolydf) + tm_polygons() +
tm_shape(points_spdf) +
tm_dots(col="measurement", palette = rev(brewer.pal(7, "RdBu")),
title="Temperature measurements (C°)", size=1) +
tm_text("measurement", just="left", xmod=.5, size = 0.7) +
tmap_options(check.and.fix = TRUE) +
tm_legend(legend.outside=TRUE)
return(plot)
}
plotInterpolationMap <- function(raster, points){
plot <- tm_shape(raster) +
tm_raster(n=10,palette = rev(brewer.pal(7, "RdBu")), auto.palette.mapping = FALSE,
title="Temperature measurements (C°)") +
tm_shape(points) + tm_dots(size=0.2) +
tm_legend(legend.outside=TRUE)
return(plot)
}