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

Error in guides_train(scales = scales$non_position_scales(), theme = theme, : could not find function "guides_train" #331

Closed
PPpissar opened this issue Mar 5, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@PPpissar
Copy link

PPpissar commented Mar 5, 2024

Hello,

This error was introduced after the update of ggplot2 from version 3.4.0 to 3.5.0. Even with the new update of microeco today this problem was not solve.

t2$plot_tern()

Input colors are not enough to use. Add more colors automatically via color interpolation ...
Registered S3 methods overwritten by 'ggtern':
method from
grid.draw.ggplot ggplot2
plot.ggplot ggplot2
print.ggplot ggplot2

Error in guides_train(scales = scales$non_position_scales(), theme = theme, :
could not find function "guides_train"

What can we do?

@ChiLiubio
Copy link
Owner

Hi. Yes. The ggplot2 3.5.0 has a new guide system (https://github.com/tidyverse/ggplot2/releases). The ggtern package in CRAN is built based on the previous ggplot2 version. It is not easy to solve by simply adding a function. How about installing a ggplot2 3.4 to do it temporarily.

@PPpissar
Copy link
Author

PPpissar commented Mar 6, 2024

Hi, I have already tried this but because of the many packages linked to ggplot2 I get this

Error in unloadNamespace(package) : namespace ‘ggplot2’ is imported by ‘ggplotify’, ‘patchwork’, ‘microbiome’, ‘ggfun’, ‘phyloseq’, ‘ggpubr’, ‘ggtree’, ‘aplot’, ‘microeco’ so cannot be unloaded

@ChiLiubio
Copy link
Owner

Hi. The author of ggtern package has updated it in CRAN and solved the issue by forcing ggplot2 >= 3.5. Please reinstall the ggtern and try again.

@ChiLiubio ChiLiubio added the documentation Improvements or additions to documentation label Mar 30, 2024
@PPpissar
Copy link
Author

PPpissar commented Mar 30, 2024 via email

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

No branches or pull requests

2 participants