Skip to content

Commit 1f0c296

Browse files
committed
Produces x-axis title automatically when no data added. Fixes #5647.
1 parent 11244c5 commit 1f0c296

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/stat-function.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ stat_function <- function(mapping = NULL, data = NULL,
5050
#' @usage NULL
5151
#' @export
5252
StatFunction <- ggproto("StatFunction", Stat,
53-
default_aes = aes(y = after_scale(y)),
53+
default_aes = aes(x = NULL, y = after_scale(y)),
5454

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

0 commit comments

Comments
 (0)