File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1460,7 +1460,10 @@ getAesMap <- function(plot, layer) {
1460
1460
}
1461
1461
}
1462
1462
1463
- # Handle compatibility for changes in ggplot2 >v3.4.2 (#5144)
1463
+ # ------------------------------------------------------------------
1464
+ # Handle compatibility for changes in ggplot2 >v3.4.2 (#5144),
1465
+ # which removed these functions in favor of scale/plot methods
1466
+ # ------------------------------------------------------------------
1464
1467
scales_transform_df <- function (scales , df ) {
1465
1468
if (is.function(scales $ transform_df )) {
1466
1469
scales $ transform_df(df )
@@ -1486,7 +1489,7 @@ scales_map_df <- function(scales, df) {
1486
1489
}
1487
1490
1488
1491
scales_add_missing <- function (plot , aesthetics ) {
1489
- if (length (plot $ scales $ add_missing )) {
1492
+ if (is.function (plot $ scales $ add_missing )) {
1490
1493
plot $ scales $ add_missing(c(" x" , " y" ), plot $ plot_env )
1491
1494
} else {
1492
1495
ggfun(" scales_add_missing" )(plot , aesthetics , plot $ plot_env )
You can’t perform that action at this time.
0 commit comments