ggtern breaks ggplot2 and produces plots without axis labels etc

心已入冬 提交于 2020-07-07 09:09:13

问题


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()

This produces a normal plot:

However, when i load ggtern, I get the following:

library(ggtern)
ggplot(df, aes(x,y)) + geom_point()

No axes etc.:

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?

来源:https://stackoverflow.com/questions/60989586/ggtern-breaks-ggplot2-and-produces-plots-without-axis-labels-etc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!