Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotate x-axis labels by default for plot method for check_outliers() #317

Closed
rempsyc opened this issue Jan 24, 2024 · 2 comments · Fixed by #321
Closed

Rotate x-axis labels by default for plot method for check_outliers() #317

rempsyc opened this issue Jan 24, 2024 · 2 comments · Fixed by #321
Assignees

Comments

@rempsyc
Copy link
Member

rempsyc commented Jan 24, 2024

For the outliers paper, we have to add manual ggplot2 code to the plot method for check_outliers() so that the labels don't overlap. Reprex:

library(performance)
library(see)

x <- check_outliers(mtcars)
plot(x)

# Correction:
plot(x) + 
  ggplot2::theme(axis.text.x = ggplot2::element_text(
    angle = 45, size = 8
  ))

Created on 2024-01-24 with reprex v2.0.2

Would it make sense to make this the default?

Later on we can tackle #262 properly but for now that should be an improvement already?

@IndrajeetPatil
Copy link
Member

Alternatively, we could use n.dodge argument and set it to 2.

@rempsyc
Copy link
Member Author

rempsyc commented Jan 24, 2024

Result for reference:

library(performance)
library(see)

x <- check_outliers(mtcars)
plot(x) + 
  ggplot2::guides(x = ggplot2::guide_axis(n.dodge = 2))

Created on 2024-01-24 with reprex v2.0.2

Yeah I think it could work too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants