Skip to content

Commit d054afc

Browse files
committed
extract show_ci atztr
1 parent 57c78b1 commit d054afc

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: see
33
Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2'
4-
Version: 0.12.0.3
4+
Version: 0.12.0.4
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",
@@ -127,4 +127,3 @@ Config/testthat/edition: 3
127127
Config/testthat/parallel: true
128128
Config/Needs/website: easystats/easystatstemplate
129129
Config/rcmdcheck/ignore-inconsequential-notes: true
130-
Remotes: easystats/performance

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
with many observations, to reduce the time for rendering the plot. Use argument
1515
`maximum_dots` to define the maximum number of data points to show.
1616

17+
* `plot()` for `check_model()` extracts the `show_ci` attribute from objects
18+
returned by `check_model()`, to show or hide confidence intervals.
19+
1720
# see 0.12.0
1821

1922
## Major Changes

R/plot.check_homogeneity.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) {
156156
colors = unname(social_colors(c("green", "blue", "red"))),
157157
alpha_dot = 0.8,
158158
show_dots = TRUE,
159+
show_ci = TRUE,
159160
maximum_dots = 2000,
160161
...
161162
) {
@@ -185,7 +186,7 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) {
185186
p +
186187
ggplot2::stat_smooth(
187188
method = "loess",
188-
se = TRUE,
189+
se = show_ci,
189190
alpha = alpha_level,
190191
formula = y ~ x,
191192
linewidth = linewidth,

R/plot.check_model.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ plot.see_check_model <- function(
5151
alpha_level <- attr(x, "alpha")
5252
alpha_dot <- attr(x, "alpha_dot")
5353
show_dots <- attr(x, "show_dots")
54+
show_ci <- attr(x, "show_ci")
5455
detrend <- attr(x, "detrend")
5556
model_info <- attr(x, "model_info")
5657
overdisp_type <- attr(x, "overdisp_type")
@@ -159,6 +160,7 @@ plot.see_check_model <- function(
159160
colors = colors,
160161
alpha_dot = alpha_dot,
161162
show_dots = show_dots,
163+
show_ci = show_ci,
162164
maximum_dots = max_dots
163165
)
164166
}
@@ -219,6 +221,7 @@ plot.see_check_model <- function(
219221
colors = colors,
220222
alpha_dot = alpha_dot,
221223
show_dots = show_dots,
224+
show_ci = show_ci,
222225
maximum_dots = max_dots
223226
)
224227
}
@@ -362,6 +365,7 @@ plot.see_check_model <- function(
362365
colors = unname(social_colors(c("green", "blue", "red"))),
363366
alpha_dot = 0.8,
364367
show_dots = TRUE,
368+
show_ci = TRUE,
365369
maximum_dots = 2000,
366370
...
367371
) {
@@ -391,7 +395,7 @@ plot.see_check_model <- function(
391395
p +
392396
ggplot2::geom_smooth(
393397
method = "loess",
394-
se = TRUE,
398+
se = show_ci,
395399
formula = y ~ x,
396400
alpha = alpha_level,
397401
linewidth = linewidth,

0 commit comments

Comments
 (0)