Skip to content

Commit

Permalink
Produces x-axis title automatically when no data added. Fixes #5647.
Browse files Browse the repository at this point in the history
  • Loading branch information
phispu committed Aug 15, 2024
1 parent 11244c5 commit 1f0c296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/stat-function.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ stat_function <- function(mapping = NULL, data = NULL,
#' @usage NULL
#' @export
StatFunction <- ggproto("StatFunction", Stat,
default_aes = aes(y = after_scale(y)),
default_aes = aes(x = NULL, y = after_scale(y)),

compute_group = function(data, scales, fun, xlim = NULL, n = 101, args = list()) {
if (is.null(scales$x)) {
Expand Down

0 comments on commit 1f0c296

Please sign in to comment.