# NOT RUN {
# create a squared tiling
aWindow <- data.frame(x = c(-180, 180),
y = c(-60, 80))
tiles <- gs_tiles(anchor = aWindow, width = 10)
visualise(`10<U+00B0> world tiles` = tiles)
# create a hexagonal tiling on top of a geom
coords <- data.frame(x = c(40, 70, 70, 50),
y = c(40, 40, 60, 70))
window <- data.frame(x = c(0, 80),
y = c(0, 80))
aGeom <- gs_polygon(anchor = coords, window = window)
visualise(`honeycomb background` = aGeom)
hex <- gs_tiles(anchor = aGeom, width = 8, pattern = "hexagonal")
visualise(hex, linecol = "deeppink", new = FALSE)
# }
Run the code above in your browser using DataLab