paleolimbot / ggspatial

Enhancing spatial visualization in ggplot2
https://paleolimbot.github.io/ggspatial
368 stars 35 forks source link

[Bug?] Annotation_spatial trains the scales? #114

Closed rhalbersma closed 1 year ago

rhalbersma commented 1 year ago

Running the example in the README doesn't reproduce the picture. Instead I get this (latest R 4.2.3):

4b1e036c-867b-4724-a6ef-a002c0504df9

Is it possible that some {ggspatial} dependency is broken, since there haven't been recent commits in this package, and I'd swear it worked before upgrading R to 4.2.3 (from 4.2.2) tonight.

paleolimbot commented 1 year ago

Thank you for posting!

I believe it's the latest ggplot2 release. You can revert by running remotes::install_github("cran/ggplot2@3.4.1") until I figure out how to fix it!

paleolimbot commented 1 year ago

This looks like it was https://github.com/tidyverse/ggplot2/pull/5170 👍

# Before:
# remotes::install_github("tidyverse/ggplot2@5074f11")
# After:
# remotes::install_github("tidyverse/ggplot2@11b6c39")
library(ggplot2)
library(ggspatial)
load_longlake_data()

ggplot() +
  annotation_spatial(longlake_roadsdf, size = 2, col = "black") +
  layer_spatial(longlake_depthdf, aes(fill = DEPTH_M))

Created on 2023-04-04 with reprex v2.0.2