Skip to content

Commit 50b8cb1

Browse files
authored
Expose xseq in stat_smooth() (#5466)
* Expose `xseq` in `stat_smooth()` * Take Gina's suggestions
1 parent 1b60839 commit 50b8cb1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

R/stat-smooth.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#' @param fullrange If `TRUE`, the smoothing line gets expanded to the range of the plot,
2424
#' potentially beyond the data. This does not extend the line into any additional padding
2525
#' created by `expansion`.
26+
#' @param xseq A numeric vector of values at which the smoother is evaluated.
27+
#' When `NULL` (default), `xseq` is internally evaluated as a sequence of `n`
28+
#' equally spaced points for continuous data.
2629
#' @param level Level of confidence interval to use (0.95 by default).
2730
#' @param span Controls the amount of smoothing for the default loess smoother.
2831
#' Smaller numbers produce wigglier lines, larger numbers produce smoother
@@ -52,6 +55,7 @@ stat_smooth <- function(mapping = NULL, data = NULL,
5255
n = 80,
5356
span = 0.75,
5457
fullrange = FALSE,
58+
xseq = NULL,
5559
level = 0.95,
5660
method.args = list(),
5761
na.rm = FALSE,
@@ -77,6 +81,7 @@ stat_smooth <- function(mapping = NULL, data = NULL,
7781
orientation = orientation,
7882
method.args = method.args,
7983
span = span,
84+
xseq = xseq,
8085
...
8186
)
8287
)

man/geom_smooth.Rd

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)