Open arodionoff opened 3 years ago
Here's a version that removes the expand_y = TRUE line and runs without error.
It appears that the version of ggtern on cran has much more recent updates than this repo. I forked cran/ggtern and removed expand_y=T from plot-build.R, which fixes this error and hasn't caused any others in my usage.
devtools::install_github("nefosl/ggtern")
https://github.com/nefosl/ggtern
I would much prefer a less drastic solution than forking the package.
I tried following https://stackoverflow.com/questions/46917301/reset-plot-settings-in-r and resetting the theme with theme_set(theme_light()). That didn't work.
I tried unloadNamespace("ggtern"). That didn't work.
I tried unloadNamespace("ggplot2") with the idea I would load it again, however every other package dependent on ggplot2 must be unloaded first. Then loaded again. That's more work than I want to put into this.
Instead I took the path of least resistance and (for now) removed "caption = " from labs().
Just bumped into this at the worst moment -- you know those times when someone wants a plot and the deadline is in 20 minutes. How is this issue still unresolved?
Hi everyone, The problem is still on, and did not found a solution to this...
How should you disable your {ggtern} package to continue using the ggplot2::labs (caption = 'Text') function?
ggplot2 3.3.5 2021-06-25 [1] CRAN (R 4.0.3) ggtern 3.3.5 2021-07-21 [1] CRAN (R 4.0.3)
and
And the error I get with the code above is:
geom_smooth() using formula 'y ~ x' Error in titleGrob(label, x, y, hjust = hj, vjust = vj, angle = angle, : unused argument (expand_y = TRUE).