R語言學(xué)習(xí)記錄:畫圖的顏色設(shè)置
數(shù)據(jù)一般分為:
類別變量(categorical variable)以及連續(xù)變量(continuous variable)
將變量值映射為顏色, 可以分為如下四種情況:
無序的分類變量;qualitative
有序的分類變量,僅有大小次序,沒有正反;sequential
有序的分類變量,有正有反;diverging
連續(xù)數(shù)值變量。continuous

The first set of color palettes are?sequential?palettes and are suitable for a variable that has ordinal meaning: temperature, precipitation, etc. The second set of palettes are?qualitative?palettes and suitable for qualitative or categorical data. Finally, the third set of palettes are?diverging?palettes and can be suitable for variables that take both negative and positive values like changes in groundwater level.
Two types of?scale
?functions can be used to use these palettes:
scale_*_distiller()
?for a continuous variablescale_*_brewer()
?for a discrete variable
To use a specific color palette, you can simply add?palette = "palette name"
?inside?scale_fill_distiller()
. The codes below applies “Spectral” as an example.

https://jaredhuling.org/jcolors/




https://cran.r-project.org/web/packages/ggsci/vignettes/ggsci.html


https://github.com/narcisoyu/moRandi
莫蘭迪配色

在線配色網(wǎng)站
https://colorbrewer2.org/
有點卡,科學(xué)上網(wǎng)會好一點
有一個介紹這個網(wǎng)站的簡短說明,來自知乎的杜雨老師
https://zhuanlan.zhihu.com/p/27167989

https://mycolor.space/
輸入你的主色調(diào)顏色號,一鍵就可以生成優(yōu)秀的配色的方案,在這里可以找到匹配的顏色,生成漂亮的調(diào)色板并了解有關(guān)顏色轉(zhuǎn)換和含義的更多信息

https://zhuanlan.zhihu.com/p/552932071

cols4all包
https://zhuanlan.zhihu.com/p/552932071
https://mycolor.space/
https://colordrop.io/


https://zhuanlan.zhihu.com/p/444953142
https://github.com/BlakeRMills/MetBrewer/tree/main