Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Imports:
cli,
grDevices,
grid,
gtable (>= 0.1.1),
gtable (>= 0.3.6),
isoband,
lifecycle (> 1.0.1),
rlang (>= 1.1.0),
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ S3method("[[",ggproto)
S3method("[[<-",uneval)
S3method(.DollarNames,ggproto)
S3method(as.data.frame,mapped_discrete)
S3method(as.gtable,ggplot)
S3method(as.gtable,ggplot_built)
S3method(as.list,ggproto)
S3method(autolayer,default)
S3method(autoplot,default)
Expand Down
6 changes: 6 additions & 0 deletions R/plot-build.R
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@
ggplot_gtable(ggplot_build(x))
}

#' @export
as.gtable.ggplot <- function(x, ...) ggplotGrob(x)

Check warning on line 316 in R/plot-build.R

View check run for this annotation

Codecov / codecov/patch

R/plot-build.R#L316

Added line #L316 was not covered by tests

#' @export
as.gtable.ggplot_built <- function(x, ...) ggplot_gtable(x)

Check warning on line 319 in R/plot-build.R

View check run for this annotation

Codecov / codecov/patch

R/plot-build.R#L319

Added line #L319 was not covered by tests

# Apply function to layer and matching data
by_layer <- function(f, layers, data, step = NULL) {
ordinal <- label_ordinal()
Expand Down
Loading