diff --git a/R/layout.R b/R/layout.R index bee258a1a9..5662ee0912 100644 --- a/R/layout.R +++ b/R/layout.R @@ -16,7 +16,7 @@ create_layout <- function(facet, coord, layout = NULL) { "x" = "not {.cl {class(layout)}" ) ) - ggproto(NULL, layout, facet = plot$facet, coord = plot$coordinates) + ggproto(NULL, layout, facet = facet, coord = coord) } #' @rdname ggplot2-ggproto diff --git a/R/plot-build.R b/R/plot-build.R index bc08a3fd2a..700260c281 100644 --- a/R/plot-build.R +++ b/R/plot-build.R @@ -46,7 +46,7 @@ ggplot_build.ggplot <- function(plot) { # Initialise panels, add extra data for margins & missing faceting # variables, and add on a PANEL variable to data - layout <- create_layout(plot$facet, plot$coord, plot$layout) + layout <- create_layout(plot$facet, plot$coordinates, plot$layout) data <- layout$setup(data, plot$data, plot$plot_env) # Compute aesthetics to produce data with generalised variable names