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

visualization_recipe() for estimate_slopes() should not map alpha to discrete values #239

Open
strengejacke opened this issue Oct 12, 2023 · 5 comments

Comments

@strengejacke
Copy link
Member

strengejacke commented Oct 12, 2023

Related to easystats/see#310
visualization_recipe() adds the alpha-aes, but it's mapped to a discrete scale, which yields a warning (and thus, some tests fail for see).

model <- lm(Petal.Length ~ Species * poly(Sepal.Width, 3), data = iris)
result <- modelbased::estimate_slopes(model, at = c("Sepal.Width", "Species"))
#> No numeric variable was specified for slope estimation. Selecting `trend = "Sepal.Width"`.
plot(result)
#> Warning: Using alpha for a discrete variable is not advised.

Created on 2023-10-12 with reprex v2.0.2

@bwiernik
Copy link
Contributor

In general, we should avoid using alpha as an aesthetic. linetype would be better here

@DominiqueMakowski
Copy link
Member

In this specific case, I like having the significant chunks on alpha... Is there a way to avoid the warning?

@bwiernik
Copy link
Contributor

I really strongly think we should not map things to alpha. It is very inaccessible. We should use color, linewidth, or linetype instead

When I was teaching, students almost always assumed that something was broken or wrong when they got a plot using alpha mapping — it’s not an aesthetic people expect to see in the situations where we use it

@DominiqueMakowski
Copy link
Member

I supposed the alternative would be dashed for non-sig and solid for sig whaddayathink?

@bwiernik
Copy link
Contributor

I would like that a lot

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

No branches or pull requests

3 participants