library(ggplot2)
tile_df <- expand.grid(
x = seq(-140, -52, by = 20),
y = seq(40, 70, by = 10)
)
ggplot(tile_df, aes(x, y)) +
geom_spatial_tile(crs = 4326) +
coord_sf(crs = 3979)
# the same plot using geom_spatial_rect()
ggplot(
tile_df,
aes(xmin = x - 10, xmax = x + 10, ymin = y - 5, ymax = y + 5)
) +
geom_spatial_rect(crs = 4326) +
coord_sf(crs = 3979)
Run the code above in your browser using DataLab