-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Would scale_linewidth_discrete()
be developed to set values manually like other scale_size_manual()
#5050
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
Comments
scale_linewidth_discrete()
be developed to set values manually like other *_manual()
scale_linewidth_discrete()
be developed to set values manually like other scale_size_manual()
I've been wondering this, too. Maybe to put it another way,
was a very convenient way to set
|
library(tidyverse)
data.frame(x = 1:10, y = 11:20, which = c(rep("a", 5), rep("b", 5))) %>%
ggplot() +
geom_line(aes(x, y, colour = which, linewidth = which)) +
scale_discrete_manual(aesthetic = "linewidth", values = c(a = 0.5, b = 5)) Created on 2022-11-20 by the reprex package (v2.0.1) Note that I'm generally in favor of having manual scales for all aesthetics. When I wanted to add some a few years ago it was vetoed and the accepted solution was |
This worked. I was unaware of |
I agree that that would make sense, but I can't find the counterarguments. I've seen a few times on SO that people were expecting |
In addition, |
@teunbrand This is the relevant discussion: I think it was mostly a "let's defer this decision" rather than "let's not do this". It's probably time to revisit this. |
Both |
Thanks! That will be a big help to everyone. |
Hi~
I'd like to ask, would the
scale_linewidth()
be developed toscale_linewidth_manual()
, so that I can set the specific value to different levels when I use a factor variable to constrain linewidth, just asscale_size_manual()
?Thanks!
The text was updated successfully, but these errors were encountered: