Skip to content

Commit

Permalink
Expose xseq in stat_smooth() (#5466)
Browse files Browse the repository at this point in the history
* Expose `xseq` in `stat_smooth()`

* Take Gina's suggestions
  • Loading branch information
teunbrand authored Feb 27, 2024
1 parent 1b60839 commit 50b8cb1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/stat-smooth.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#' @param fullrange If `TRUE`, the smoothing line gets expanded to the range of the plot,
#' potentially beyond the data. This does not extend the line into any additional padding
#' created by `expansion`.
#' @param xseq A numeric vector of values at which the smoother is evaluated.
#' When `NULL` (default), `xseq` is internally evaluated as a sequence of `n`
#' equally spaced points for continuous data.
#' @param level Level of confidence interval to use (0.95 by default).
#' @param span Controls the amount of smoothing for the default loess smoother.
#' Smaller numbers produce wigglier lines, larger numbers produce smoother
Expand Down Expand Up @@ -52,6 +55,7 @@ stat_smooth <- function(mapping = NULL, data = NULL,
n = 80,
span = 0.75,
fullrange = FALSE,
xseq = NULL,
level = 0.95,
method.args = list(),
na.rm = FALSE,
Expand All @@ -77,6 +81,7 @@ stat_smooth <- function(mapping = NULL, data = NULL,
orientation = orientation,
method.args = method.args,
span = span,
xseq = xseq,
...
)
)
Expand Down
5 changes: 5 additions & 0 deletions man/geom_smooth.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 50b8cb1

Please sign in to comment.