我想知道如何将此树形图的颜色更改为“#453781FF”。我已经尝试了不同的方法,这是最好的可行解决方案,但是它并不是预期的结果,因为您可以看到此图像的颜色是粉红色。
library(readr)
library(ggplot2)
library(treemapify)
url_t = "https://raw.githubusercontent.com/frm1789/landslide-ea/master/df_treemap.csv"
df_t = read_csv(url_t)
ggplot2::ggplot(df_t, ggplot2::aes(area = n, label = country, fill =
"#453781FF")) +
#geom_treemap(color = "red") +
geom_treemap(aes(alpha = v_alpha)) +
geom_treemap_text(fontface = "italic", colour = "white", place =
"centre",
grow = TRUE)