Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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)

* New default `geom_qq_line(geom = "abline")` for better clipping in the
vertical direction. In addition, `slope` and `intercept` are new computed
variables in `stat_qq_line()` (@teunbrand, #6087).
* Position adjustments can now have auxiliary aesthetics (@teunbrand).
* `position_nudge()` gains `nudge_x` and `nudge_y` aesthetics (#3026, #5445).
* `position_dodge()` gains `order` aesthetic (#3022, #3345)
Expand Down
7 changes: 5 additions & 2 deletions R/stat-qq-line.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' the data
geom_qq_line <- function(mapping = NULL,
data = NULL,
geom = "path",
geom = "abline",
position = "identity",
...,
distribution = stats::qnorm,
Expand Down Expand Up @@ -86,6 +86,9 @@ StatQqLine <- ggproto("StatQqLine", Stat,
x <- range(theoretical)
}

data_frame0(x = x, y = slope * x + intercept)
data_frame0(
x = x, y = slope * x + intercept,
slope = slope, intercept = intercept
)
}
)
4 changes: 3 additions & 1 deletion R/stat-qq.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#' x = "x-coordinates of the endpoints of the line segment connecting the
#' points at the chosen quantiles of the theoretical and the sample
#' distributions.",
#' y = "y-coordinates of the endpoints."
#' y = "y-coordinates of the endpoints.",
#' slope = "Amount of change in `y` across 1 unit of `x`.",
#' intercept = "Value of `y` at `x == 0`."
#' )
#'
#' @export
Expand Down
6 changes: 4 additions & 2 deletions man/geom_qq.Rd

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

Loading