Reputation: 392
I noticed that, since ggplot2 released their new version (3.3.0), I can no longer use the package ggtern, as it completely breaks all my plots produced with ggplot2.
library(ggplot2)
df <- data.frame("x" = c(1,2), "y" = c(2,1))
ggplot(df, aes(x,y)) + geom_point()
However, when i load ggtern, I get the following:
library(ggtern)
ggplot(df, aes(x,y)) + geom_point()
It also stays this way when i detach ggtern, so I have to restart R to produce normal plots again.
A workaround is to downgrade ggplot2 to an older version (i.e. version 3.2.1), however, this comes with other downsides.
Is there another workaround where I can use the current ggplot2 Version and ggtern?
Upvotes: 4
Views: 585
Reputation: 4702
Here is a work-around I found. I save my plot into variable p
. Then I call ggplot2:::plot.ggplot(p)
. That at least makes axis text show up for me.
Upvotes: 0