我正在嘗試使用 gganimate 為 R 中的三元圖設定影片,并且我正面臨著一堵墻。
library(tidyverse)
library(gganimate)
library(ggtern)
#> Registered S3 methods overwritten by 'ggtern':
#> method from
#> grid.draw.ggplot ggplot2
#> plot.ggplot ggplot2
#> print.ggplot ggplot2
#> --
#> Remember to cite, run citation(package = 'ggtern') for further info.
#> --
#>
#> Attaching package: 'ggtern'
#> The following objects are masked from 'package:ggplot2':
#>
#> aes, annotate, ggplot, ggplot_build, ggplot_gtable, ggplotGrob,
#> ggsave, layer_data, theme_bw, theme_classic, theme_dark,
#> theme_gray, theme_light, theme_linedraw, theme_minimal, theme_void
data=tibble(x=runif(200), y = runif(200), z = runif(200), time=rep(seq(1:10),20))
ggtern(data, aes(x,y,z))
geom_point()
theme_rgbw()
stat_density_tern(geom = 'polygon',
aes(fill = ..level..,
alpha = ..level..), bdl=0.001)
scale_fill_gradient(low = "blue",high = "red")
guides(color = "none", fill = "none", alpha = "none")
#> Warning: Removed 1 rows containing non-finite values (StatDensityTern).


轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/527516.html
標籤:rggplot2tidyversegganimate格顿
上一篇:我想在R中使用ggplot2在我的條形圖頂部添加一個總計。當我嘗試時,我得到的是每一行的值而不是總計
下一篇:精確調整ggplot
