R语言之可视化(21)令人眼前一亮的颜色包

目录

R语言之可视化①误差棒

R语言之可视化②点图

R语言之可视化③点图续

R语言之可视化④点韦恩图upsetR

R语言之可视化⑤R图形系统

R语言之可视化⑥R图形系统续

R语言之可视化⑦easyGgplot2散点图

R语言之可视化⑧easyGgplot2散点图续

R语言之可视化⑨火山图

R语言之可视化⑩坐标系统

R语言之可视化①①热图绘制heatmap

R语言之可视化①②热图绘制2

R语言之可视化①③散点图+拟合曲线

R语言之可视化①④一页多图(1)

R语言之可视化①⑤ROC曲线

R语言之可视化①⑥一页多图(2)

R语言之可视化①⑦调色板

R语言之可视化①⑧子图组合patchwork包

R语言之可视化①⑨之ggplot2中的图例修改

R语言之可视化(20)之geom_label()和geom_text()

R语言之可视化(21)令人眼前一亮的颜色包

Installation

install.packages("wesanderson")

Or the development version

devtools::install_github("karthik/wesanderson")

Usage

library("wesanderson")

# See all palettes
names(wes_palettes)
#>  [1] "BottleRocket1"  "BottleRocket2"  "Rushmore1"      "Rushmore"      
#>  [5] "Royal1"         "Royal2"         "Zissou1"        "Darjeeling1"   
#>  [9] "Darjeeling2"    "Chevalier1"     "FantasticFox1"  "Moonrise1"     
#> [13] "Moonrise2"      "Moonrise3"      "Cavalcanti1"    "GrandBudapest1"
#> [17] "GrandBudapest2" "IsleofDogs1"    "IsleofDogs2"

颜色版

Bottle Rocket (1996)

wes_palette("BottleRocket1")
wes_palette("BottleRocket2")

Rushmore (1998)

wes_palette("Rushmore1")

The Royal Tenenbaums (2001)

wes_palette("Royal1")
image.png
wes_palette("Royal2")
library("ggplot2")
ggplot(mtcars, aes(factor(cyl), fill=factor(vs))) +  geom_bar() +
  scale_fill_manual(values = wes_palette("Royal1"))

The Life Aquatic with Steve Zissou (2004)

wes_palette("Zissou1")
pal <- wes_palette("Zissou1", 21, type = "continuous")
image(volcano, col = pal)
pal <- wes_palette("Zissou1", 100, type = "continuous")
# heatmap is a local dataset
ggplot(heatmap, aes(x = X2, y = X1, fill = value)) +
  geom_tile() + 
  scale_fill_gradientn(colours = pal) + 
  scale_x_discrete(expand = c(0, 0)) +
  scale_y_discrete(expand = c(0, 0)) + 
  coord_equal() 

The Darjeeling Limited (2007)

wes_palette("Darjeeling1")
wes_palette("Darjeeling2")

Hotel Chevalier (2007)

wes_palette("Chevalier1")

Fantastic Mr. Fox (2009)

wes_palette("FantasticFox1")

Moonrise Kingdom (2012)

wes_palette("Moonrise1")
wes_palette("Moonrise2")
wes_palette("Moonrise3")

Castello Cavalcanti (2013)

wes_palette("Cavalcanti1")

The Grand Budapest Hotel (2014)

wes_palette("GrandBudapest1")
wes_palette("GrandBudapest2")

The Isle of Dogs (2018)

wes_palette("IsleofDogs1")
wes_palette("IsleofDogs2")

推荐阅读更多精彩内容