tayloRswift
https://github.com/asteves/tayloRswift
install.packages(c("tayloRswift"))
总共涉及到11个专辑的封面
离散型变量或者连续型变量都可以使用
library(ggplot2)
library(tayloRswift)
colnames(iris)
p1<-ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width))+
geom_point(aes(color=Species),size=5)+
theme_bw()+
scale_color_taylor(palette = "lover")
p2<-ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width))+
geom_point(aes(color=Petal.Length),size=5)+
theme_bw()+
scale_color_taylor(palette = "Red",
discrete = F,
guide="none")
library(patchwork)
p1+p2
配色函数是scale_color_taylor()
或者scale_fill_taylor()
默认是离散型配色,如果是连续型数据可以指定参数discrete=F
这个配色风格用到科研上也未尝不可,哈哈哈,大家感兴趣的可以自己试试这个代码