-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Rendering book fails at scales-other.qmd #5991
Comments
Ugh, sorry, had this repo and book repo open at same time - used the wrong one. |
Actually, I'll reopen this because as far as I can tell this is a bug with ggplot2 not with the book code specifically. |
Thanks for the report! I guess the reprex for the problem is as follows: library(ggplot2)
base <- ggplot(economics_long, aes(date, value01, linetype = variable)) +
geom_line()
ltys <- c("55", "75", "95", "1115", "111115", "11111115",
"5158", "9198", "c1c8")
linetypes <- function(n) {
return(ltys[seq_len(n)])
}
base + scale_linetype(palette = linetypes)
#> Error in discrete_scale("linetype", name = name, palette = pal_linetype(), : formal argument "palette" matched by multiple actual arguments The plot above should yield: base + scale_linetype_manual(values = ltys) Created on 2024-07-10 with reprex v2.1.0 |
Might be best to fix this in #5946, as it touches the same code. |
On second thought: no the book is wrong and the only thing ggplot2 should change is dedocument the These problems started occurring after #5343 when we started to provide the If we look at the > ggplot2::scale_linetype
function (..., na.value = "blank")
{
discrete_scale("linetype", "linetype_d", linetype_pal(),
na.value = na.value, ...)
} So if we declare So, throwing errors when we have an extra |
Aaaah I see. Ok thank you, I'll manually fix the book for now and leave my issue up there. Thanks for your help. |
I'm going to re-open this to adress the documentation issue:
|
Hello,
When rendering the book (
quarto render --to pdf
) there is a failure in scales-other.qmd as per:The offending lines are:
I guess this is due to some of the changes in
discrete_scale()
?Thanks.
The text was updated successfully, but these errors were encountered: