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

Backward compatibility with ggplot2 < 3.5.0 #29

Closed
nanxstats opened this issue Mar 22, 2024 · 0 comments · Fixed by #30
Closed

Backward compatibility with ggplot2 < 3.5.0 #29

nanxstats opened this issue Mar 22, 2024 · 0 comments · Fixed by #30
Assignees
Labels

Comments

@nanxstats
Copy link
Owner

nanxstats commented Mar 22, 2024

Using ggsci 3.0.2 (the version that removes scale_name argument) with ggplot2 < 3.5.0, it will complain:

Error in `discrete_scale()`:
! argument "scale_name" is missing, with no default
Backtrace:
 1. ggsci::scale_color_npg()
 2. ggplot2::discrete_scale(...)
 3. ggplot2::ggproto(...)
 4. rlang::list2(...)
Execution halted

There are two options:

  1. We could declare the minimum version ggplot2 (>= 3.5.0) in DESCRIPTION, As suggested by Using scale_colour_xxx throws a warning with recent ggplot2 #25 (comment), although that would require users to upgrade ggplot2.

  2. Determine the ggplot2 version live and then branch off, to keep it backward compatible. This seem related: shiny:::is_installed().

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

Successfully merging a pull request may close this issue.

1 participant