Skip to content

Commit ebf1c27

Browse files
committed
geom/stat_qq_line() use stat = "abline"
1 parent 859f618 commit ebf1c27

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/stat-qq-line.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' the data
77
geom_qq_line <- function(mapping = NULL,
88
data = NULL,
9-
geom = "path",
9+
geom = "abline",
1010
position = "identity",
1111
...,
1212
distribution = stats::qnorm,
@@ -86,6 +86,9 @@ StatQqLine <- ggproto("StatQqLine", Stat,
8686
x <- range(theoretical)
8787
}
8888

89-
data_frame0(x = x, y = slope * x + intercept)
89+
data_frame0(
90+
x = x, y = slope * x + intercept,
91+
slope = slope, intercept = intercept
92+
)
9093
}
9194
)

0 commit comments

Comments
 (0)