Skip to content

Commit 02803da

Browse files
authored
Plot estimated means - why connecting lines between groups? (#607)
* Plot estimated means - why connecting lines between groups? Fixes #603 * update snaps * add snaps * fix test * update snaps/tests
1 parent dc486da commit 02803da

File tree

56 files changed

+1312
-322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1312
-322
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: modelbased
33
Title: Estimation of Model-Based Predictions, Contrasts and Means
4-
Version: 0.14.0.1
4+
Version: 0.14.0.2
55
Authors@R:
66
c(person(given = "Dominique",
77
family = "Makowski",

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# modelbased (devel)
22

3+
## Breaking Changes
4+
5+
* Argument `join_dots` in the `plot()` method, which is used to connect dots
6+
with lines, now defaults to `FALSE`.
7+
38
## Changes
49

510
* Support for models of class `nestedLogit`.

R/visualisation_recipe.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
#' `collapse_group` argument to "collapse" data points by random effects
2828
#' grouping factors. Argument `show_data` will be ignored for plotting objects
2929
#' returned by `estimate_slopes()` or `estimate_grouplevel()`.
30-
#' @param join_dots Logical, if `TRUE` (default) and for categorical focal terms
31-
#' in `by`, dots (estimates) are connected by lines, i.e. plots will be a
32-
#' combination of dots with error bars and connecting lines. If `FALSE`, only
33-
#' dots and error bars are shown. It is possible to set a global default value
34-
#' using `options()`, e.g. `options(modelbased_join_dots = FALSE)`.
30+
#' @param join_dots Logical, if `TRUE` and for categorical focal terms in `by`,
31+
#' dots (estimates) are connected by lines, i.e. plots will be a combination of
32+
#' dots with error bars and connecting lines. If `FALSE` (default), only dots
33+
#' and error bars are shown. It is possible to set a global default value using
34+
#' `options()`, e.g. `options(modelbased_join_dots = TRUE)`.
3535
#' @param numeric_as_discrete Maximum number of unique values in a numeric
3636
#' predictor to treat that predictor as discrete. Defaults to `8`. Numeric
3737
#' predictors are usually mapped to a continuous color scale, unless they have
@@ -203,7 +203,7 @@ visualisation_recipe.estimate_predicted <- function(
203203

204204
# set defaults
205205
if (is.null(join_dots)) {
206-
join_dots <- getOption("modelbased_join_dots", TRUE)
206+
join_dots <- getOption("modelbased_join_dots", FALSE)
207207
}
208208
if (is.null(numeric_as_discrete)) {
209209
numeric_as_discrete <- getOption("modelbased_numeric_as_discrete", 8)

R/visualisation_recipe_internal.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
ribbon = NULL,
280280
facet = NULL,
281281
grid = NULL,
282-
join_dots = TRUE,
282+
join_dots = FALSE,
283283
numeric_as_discrete = 8,
284284
...
285285
) {

man/visualisation_recipe.estimate_predicted.Rd

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

tests/testthat/_snaps/plot-facet/plot-interaction-facets-cat-1-lines.svg

Lines changed: 298 additions & 0 deletions
Loading

tests/testthat/_snaps/plot-facet/plot-interaction-facets-cat-1.svg

Lines changed: 0 additions & 21 deletions
Loading

0 commit comments

Comments
 (0)