diff --git a/NAMESPACE b/NAMESPACE index e163a4aef..6b3877e78 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,7 +9,7 @@ S3method(print,ggmatrix) S3method(print,glyphplot) S3method(print,legend_guide_box) S3method(str,ggmatrix) -export(StatGgallyCount) +export(StatGGallyCount) export(add_ggproto_to_ggmatrix) export(add_ref_boxes) export(add_ref_lines) diff --git a/R/gg-plots.R b/R/gg-plots.R index 4cf81866d..ffa2a3f04 100644 --- a/R/gg-plots.R +++ b/R/gg-plots.R @@ -1402,8 +1402,9 @@ ggally_count <- function(data, mapping, ...) { # default values args <- list(...) - if (!"fill" %in% names(args) & is.null(mapping$fill)) - args$fill <- "grey50" + if (!"fill" %in% names(args) & is.null(mapping$fill)) { + args$fill <- GeomRect$default_aes$fill + } ggplot(data, mapping) + do.call(stat_ggally_count, args) + @@ -1443,7 +1444,7 @@ stat_ggally_count <- function(mapping = NULL, data = NULL, layer( data = data, mapping = mapping, - stat = StatGgallyCount, + stat = StatGGallyCount, geom = geom, position = position, show.legend = show.legend, @@ -1456,7 +1457,7 @@ stat_ggally_count <- function(mapping = NULL, data = NULL, #' @format NULL #' @usage NULL #' @export -StatGgallyCount <- ggproto("StatGgallyCount", Stat, +StatGGallyCount <- ggproto("StatGGallyCount", Stat, required_aes = c("x", "base_y"), default_aes = aes( weight = 1, diff --git a/man/ggally_count.Rd b/man/ggally_count.Rd index b436189fb..bf81e5adc 100644 --- a/man/ggally_count.Rd +++ b/man/ggally_count.Rd @@ -4,7 +4,7 @@ \name{ggally_count} \alias{ggally_count} \alias{stat_ggally_count} -\alias{StatGgallyCount} +\alias{StatGGallyCount} \alias{ggally_countDiag} \title{Plots the number of observations} \usage{