Skip to content

Commit

Permalink
updates to tmap code
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowosad committed Oct 12, 2023
1 parent 4673b32 commit 2496b18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions 10-gis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ tm_shape(incongr_wgs) +
tm_polygons(col = "grey5") +
tm_shape(aggzone_wgs) +
tm_borders(col_alpha = 0.5, col = "red") +
tm_add_legend(type = "Lines", labels = c("incongr_wgs", "aggzone_wgs"),
tm_add_legend(type = "lines", labels = c("incongr_wgs", "aggzone_wgs"),
col = c("grey5", "red"), lwd = 3, position = tm_pos_in("right", "top")) +
tm_scalebar(position = c("left", "bottom"), breaks = c(0, 0.5, 1)) +
tm_layout(frame = FALSE, legend.text.size = 1)
Expand Down Expand Up @@ -929,11 +929,11 @@ tm_shape(buf) +
tm_lines(col = "black", lwd = 3) +
tm_shape(hardees) +
tm_symbols(fill = "#F10C26") +
tm_add_legend(type = "Lines", col = "black", lwd = 3,
tm_add_legend(type = "lines", col = "black", lwd = 3,
labels = "The US Route 1 highway") +
tm_add_legend(type = "Polygons", fill = "#FFFDD0",
tm_add_legend(type = "polygons", fill = "#FFFDD0",
border.alpha = 0.3, labels = "35km buffer") +
tm_add_legend(type = "Symbols", fill = "#F10C26",
tm_add_legend(type = "symbols", fill = "#F10C26",
labels = "Restaurants", shape = 21) +
tm_layout(frame = FALSE)
```
Expand Down
2 changes: 1 addition & 1 deletion 13-transport.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ tm_shape(desire_lines_short) +
tm_shape(routes_short) +
tm_lines(col = "red") +
tm_add_legend(title = "Entity", labels = c("Desire lines", "Routes"),
type = "Lines", col = c("black", "red"), lty = c(2, 1),
type = "lines", col = c("black", "red"), lty = c(2, 1),
position = tm_pos_in("left", "top")) +
tm_shape(zone_cents_routes) +
tm_symbols(fill = "black", size = 0.5)
Expand Down
4 changes: 2 additions & 2 deletions code/06-pointextr.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ tm1 = tm_shape(srtm) +
tm_borders(lwd = 2) +
tm_shape(zion_points) +
tm_symbols(fill = "black", size = 0.5) +
tm_add_legend(type = "Symbols", fill = "black", size = 0.7,
tm_add_legend(type = "symbols", fill = "black", size = 0.7,
labels = "zion_points", shape = 21) +
tm_layout(legend.frame = TRUE, legend.position = c("right", "top"),
legend.bg.color = "white")
tm1
tm1

0 comments on commit 2496b18

Please sign in to comment.