{wesanderson}:电影级配色!《布达佩斯大饭店》也能画在图里~
install.packages("wesanderson")
library(wesanderson)
library(ggplot2) # 需提前安装:install.packages("ggplot2")
names(wes_palettes)

wes_palette("GrandBudapest1")

wes_palette("GrandBudapest2")

wes_palette("BottleRocket1", 4)

wes_palette("Rushmore1", type = "continuous", 8)

set.seed(705)
mydata <- iris[sample(nrow(iris), 100), ]
summary(mydata)

ggplot(mydata, aes(Sepal.Length, Sepal.Width, size = Petal.Length , fill = Species)) +
geom_jitter(alpha = 0.6, shape = 21) +
scale_fill_manual(values = wes_palette("GrandBudapest1")) +
theme_light()

image(volcano,
col = wes_palette("GrandBudapest2", type = "continuous", 20))
title(main = "The Grand Budapest Hotel Palette") # 添加标题


[1]. https://github.com/karthik/wesanderson
2024-07-08 12:15