Skip to content

Commit

Permalink
Rotate x-axis labels by default for plot method for check_outliers()
Browse files Browse the repository at this point in the history
Fixes #317
  • Loading branch information
strengejacke committed Feb 4, 2024
1 parent deedc5f commit c183aac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: see
Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2'
Version: 0.8.1.1
Version: 0.8.1.2
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down Expand Up @@ -117,4 +117,4 @@ Config/Needs/website:
rstudio/bslib,
r-lib/pkgdown,
easystats/easystatstemplate
Remotes: easystats/parameters, easystats/bayestestR
Remotes: easystats/bayestestR
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* `plot.n_factors()` now shows a dashed line over the bars, indicating the
cumulate explained variance by the number of factors.

* `plot.check_outliers()` now dodges the x-axis labels, to avoid overlapping
labels.

# see 0.8.1

## Major Changes
Expand Down
5 changes: 3 additions & 2 deletions R/plot.check_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ data_plot.check_outliers <- function(x, data = NULL, rescale_distance = TRUE, ..
}
}

p
p + guides(x = guide_axis(n.dodge = 2))
}


Expand Down Expand Up @@ -182,6 +182,7 @@ data_plot.check_outliers <- function(x, data = NULL, rescale_distance = TRUE, ..
linetype = "dashed",
colour = ifelse(as.numeric(x) >= 0.5, "red", "lightgrey")
)
)
) +
guides(x = guide_axis(n.dodge = 2))
)
}

0 comments on commit c183aac

Please sign in to comment.