@@ -116,7 +116,7 @@ CoordSf <- ggproto("CoordSf", CoordCartesian,
116116 x_breaks <- graticule $ degree [graticule $ type == " E" ]
117117 if (is.null(scale_x $ labels )) {
118118 x_labels <- rep(NA , length(x_breaks ))
119- } else if (is.waiver (scale_x $ labels )) {
119+ } else if (is_waiver (scale_x $ labels )) {
120120 x_labels <- graticule $ degree_label [graticule $ type == " E" ]
121121 needs_autoparsing [graticule $ type == " E" ] <- TRUE
122122 } else {
@@ -141,7 +141,7 @@ CoordSf <- ggproto("CoordSf", CoordCartesian,
141141 y_breaks <- graticule $ degree [graticule $ type == " N" ]
142142 if (is.null(scale_y $ labels )) {
143143 y_labels <- rep(NA , length(y_breaks ))
144- } else if (is.waiver (scale_y $ labels )) {
144+ } else if (is_waiver (scale_y $ labels )) {
145145 y_labels <- graticule $ degree_label [graticule $ type == " N" ]
146146 needs_autoparsing [graticule $ type == " N" ] <- TRUE
147147 } else {
@@ -335,7 +335,7 @@ CoordSf <- ggproto("CoordSf", CoordCartesian,
335335
336336 # we don't draw the graticules if the major panel grid is
337337 # turned off
338- if (inherits (el , " element_blank " )) {
338+ if (is_theme_element (el , " blank " )) {
339339 grobs <- list (element_render(theme , " panel.background" ))
340340 } else {
341341 line_gp <- gg_par(
@@ -554,7 +554,7 @@ coord_sf <- function(xlim = NULL, ylim = NULL, expand = TRUE,
554554 ndiscr = 100 , default = FALSE , clip = " on" ,
555555 reverse = " none" ) {
556556
557- if (is.waiver (label_graticule ) && is.waiver (label_axes )) {
557+ if (is_waiver (label_graticule ) && is_waiver (label_axes )) {
558558 # if both `label_graticule` and `label_axes` are set to waive then we
559559 # use the default of labels on the left and at the bottom
560560 label_graticule <- " "
@@ -641,13 +641,13 @@ sf_breaks <- function(scale_x, scale_y, bbox, crs) {
641641 bbox [is.na(bbox )] <- c(- 180 , - 90 , 180 , 90 )[is.na(bbox )]
642642 }
643643
644- if (! (is.waiver (scale_x $ breaks ) && is.null(scale_x $ n.breaks ))) {
644+ if (! (is_waiver (scale_x $ breaks ) && is.null(scale_x $ n.breaks ))) {
645645 x_breaks <- scale_x $ get_breaks(limits = bbox [c(1 , 3 )])
646646 finite <- is.finite(x_breaks )
647647 x_breaks <- if (any(finite )) x_breaks [finite ] else NULL
648648 }
649649
650- if (! (is.waiver (scale_y $ breaks ) && is.null(scale_y $ n.breaks ))) {
650+ if (! (is_waiver (scale_y $ breaks ) && is.null(scale_y $ n.breaks ))) {
651651 y_breaks <- scale_y $ get_breaks(limits = bbox [c(2 , 4 )])
652652 finite <- is.finite(y_breaks )
653653 y_breaks <- if (any(finite )) y_breaks [finite ] else NULL
@@ -770,7 +770,7 @@ view_scales_from_graticule <- function(graticule, scale, aesthetic,
770770 if (scale $ position != position ) {
771771 # Try to use secondary axis' guide
772772 guide <- scale $ secondary.axis $ guide %|| % waiver()
773- if (is.derived (guide )) {
773+ if (is_derived (guide )) {
774774 guide <- scale $ guide
775775 }
776776 } else {
0 commit comments