Skip to content

Commit

Permalink
Adds explicit ggplot2::after_stat
Browse files Browse the repository at this point in the history
  • Loading branch information
eliocamp committed Mar 23, 2023
1 parent 73265d0 commit 96cf1ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/stat_contour2.r
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ stat_contour2 <- function(mapping = NULL, data = NULL,
#' @export
StatContour2 <- ggplot2::ggproto("StatContour2", ggplot2::Stat,
required_aes = c("x", "y", "z"),
default_aes = ggplot2::aes(order = after_stat(level)),
default_aes = ggplot2::aes(order = ggplot2::after_stat(level)),
dropped_aes = "z",
setup_params = function(data, params) {
if (is.null(params$global) || isTRUE(params$global.breaks)) {
Expand Down Expand Up @@ -346,7 +346,7 @@ setup_breaks <- function(data, breaks, bins, binwidth) {
#' @export
StatTextContour <- ggplot2::ggproto("StatTextContour", StatContour2,
required_aes = c("x", "y", "z"),
default_aes = ggplot2::aes(order = after_stat(level), label = after_stat(level)),
default_aes = ggplot2::aes(order = ggplot2::after_stat(level), label = ggplot2::after_stat(level)),
dropped_aes = "z"
)

2 changes: 1 addition & 1 deletion R/stat_contour_fill.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ stat_contour_fill <- function(mapping = NULL, data = NULL,
#' @export
StatContourFill <- ggplot2::ggproto("StatContourFill", ggplot2::Stat,
required_aes = c("x", "y", "z"),
default_aes = ggplot2::aes(fill = after_stat(level_mid), order = after_stat(level)),
default_aes = ggplot2::aes(fill = ggplot2::after_stat(level_mid), order = ggplot2::after_stat(level)),
dropped_aes = "z",
setup_params = function(data, params) {
if (is.null(params$global) || isTRUE(params$global.breaks)) {
Expand Down

0 comments on commit 96cf1ec

Please sign in to comment.