我正在尝试改变冲积地块流动元素的透明度。我知道我应该更改 'alpha' 的值,但我不确定我必须在代码中的哪个位置添加此参数。以下是我的代码:
library(ggplot2)
library(ggalluvial)
ggplot(sp.alluvial, aes(x = stage, stratum = state, alluvium = pks, fill = state, label = state)) +
scale_fill_brewer(type = "qual", palette = "Set2") +
geom_flow(stat = "alluvium", lode.guidance = "frontback", aes(fill = state), aes.flow = "backward") +
geom_stratum() +
theme(legend.position = "bottom", axis.text.y = element_blank(), axis.ticks.y = element_blank())
我尝试了下一个选项:
geom_flow(stat = "alluvium", lode.guidance = "frontback", aes(fill = state), aes.flow = "backward", alpha = 0.6)
geom_flow(stat = "alluvium", lode.guidance = "frontback", aes(fill = state, alpha = 0.6), aes.flow = "backward")
和
+ geom_density(alpha = 0.6)
有任何想法吗?
谢谢!