Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ggplot2 (development version)

* Fixed bug in `stat_function()` so x-axis title now produced automatically
when no data added.
(@phispu, #5647).
* Missing values from discrete palettes are no longer translated
(@teunbrand, #5929).
* Fixed bug in `facet_grid(margins = TRUE)` when using expresssions
Expand Down
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