Compatibility with ggplot2 4.0.0 (#4226)

* add S7 class method

* Update tests/testthat/test-plot-coordmap.R

---------

Co-authored-by: Winston Chang <winston@stdout.org>
This commit is contained in:
Teun van den Brand
2025-06-10 00:20:43 +02:00
committed by GitHub
parent eac0eea886
commit a660093fa5

View File

@@ -6,7 +6,9 @@ sortList <- function(x) {
}
# This will create print.ggplot in the current environment
print.ggplot <- custom_print.ggplot
# print.ggplot is for ggplot2 < 4.0.0
# print.ggplot2::ggplot is for ggplot2 >= 4.0.0
print.ggplot <- `print.ggplot2::ggplot` <- custom_print.ggplot
test_that("ggplot coordmap", {