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

fix warning message: deprecated arguments #189

Merged
merged 2 commits into from
Dec 12, 2022
Merged

Conversation

Yunuuuu
Copy link
Contributor

@Yunuuuu Yunuuuu commented Nov 6, 2022

adjust to ggplot2 parameters

@clauswilke
Copy link
Contributor

Please file an issue first, then we can discuss an appropriate PR.

@Yunuuuu
Copy link
Contributor Author

Yunuuuu commented Nov 7, 2022

Sorry, I'll open a issue, and now, I'll give a description of the problem this commit fixed. When I used function (like scater::plotColData) which internally called theme function from cowplot there always prompts some annoying message by ggplot2 deprecated arguments size from element_text() and element_rect(). A minimal example:

library(ggplot2)
library(cowplot)


ggplot(mtcars) +
    geom_point(aes(mpg, drat)) +
    theme_cowplot()

Warning messages:
1: The `size` argument of `element_line()` is
deprecated as of ggplot2 3.4.0.
ℹ Please use the `linewidth` argument instead.
ℹ The deprecated feature was likely used in the
  cowplot package.
  Please report the issue at
  <https://github.com/wilkelab/cowplot/issues>.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to
see where this warning was generated. 
2: The `size` argument of `element_rect()` is
deprecated as of ggplot2 3.4.0.
ℹ Please use the `linewidth` argument instead.
ℹ The deprecated feature was likely used in the
  cowplot package.
  Please report the issue at
  <https://github.com/wilkelab/cowplot/issues>.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to
see where this warning was generated. 

@Yunuuuu
Copy link
Contributor Author

Yunuuuu commented Nov 7, 2022

fix #190

@Yunuuuu
Copy link
Contributor Author

Yunuuuu commented Nov 7, 2022

And maybe we shoud add a dependencies of ggplot2 (> 3.4.0) ?

@Yunuuuu
Copy link
Contributor Author

Yunuuuu commented Nov 14, 2022

The latest ggplot2 has been published: https://github.com/tidyverse/ggplot2/releases/tag/v3.4.0

@clauswilke
Copy link
Contributor

Apologies for the absence on my end. Could you do the following, and then I'm happy to merge:

  1. Update the ggplot2 dependency so it's clear we will need >= 3.4.0 going forward
  2. Make an entry in NEWS.md describing the changes. I encourage you to acknowledge your contribution as described here.

Also, can you confirm that you have searched the codebase and found all instances that require this change? Thanks for your efforts!

@Yunuuuu
Copy link
Contributor Author

Yunuuuu commented Dec 12, 2022

I have searched element_line and element_rect use vscode. all related size argument have beee substituted by linewidth

@clauswilke clauswilke merged commit 1f35f38 into wilkelab:master Dec 12, 2022
@clauswilke
Copy link
Contributor

Thanks!

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 this pull request may close these issues.

2 participants