Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3
CET Perceptually Uniform Colour Maps for R
coatless-rpkg/cetcolor
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Thecetcolor package isdesigned to bring toR the 56 colour maps created byPeterKovesi that avoid points of locally high colourcontrast leading to the perception of false anomalies in your data whenthere is none. The colour maps have been designed to avoid thisphenomenon by having uniform perceptual contrast over their whole range.
Thecetcolor package is available on both CRAN and GitHub. The CRANversion is considered stable while the GitHub version is in a state ofdevelopment and may break.
You can install the stable version of thecetcolor package with:
install.packages("cetcolor")For the development version, you can opt for:
install.packages("remotes")remotes::install_github("coatless-rpkg/cetcolor")
# Load the Librarylibrary("cetcolor")# Get RGB Hexadecimals for graphingcet_pal(5,name="blues")#> [1] "#F1F1F1" "#C0D3EB" "#93B5DD" "#7197C1" "#3B7CB2"# Sample use with ggplot2library("ggplot2")ggplot(faithfuld, aes(waiting,eruptions))+ geom_raster(aes(fill=density))+ theme_bw()+ theme(panel.grid=element_blank())->glibrary("gridExtra")# Frequently used colour maps have "nicknames" see ?cet_color_mapsgrid.arrange(g+ scale_fill_gradientn(colours= cet_pal(5,name="fire")),g+ scale_fill_gradientn(colours= cet_pal(5,name="inferno")),g+ scale_fill_gradientn(colours= cet_pal(5,name="blues")),g+ scale_fill_gradientn(colours= cet_pal(5,name="kgy")),ncol=2,nrow=2)
# Show a panel of possible values (without nicknames)display_cet_all()- CET Perceptually Uniform Colour Maps: DownloadPage
- Location of CSV data, references, and data.
- colorcet for Python
- Shorthand naming of colour schemes and presentation of palettes
- PerceptualColourMaps.jl by PeterKovesi
- Referenced documentation and possible reimplementation of generationfunctions to avoid using CSV data.
viridis(Source)- Provides MATLAB perceptually uniform colour maps in a manner that issimilar to this package.
RColorBrewer(Source)- Function interface naming, e.g.
cet_pal(n, name), and colour mapdisplays.
- Function interface naming, e.g.
scalesandggplot2- Proper ways to interface colour palettes with
ggplot2as shown forRColorBrewer.
- Proper ways to interface colour palettes with
- Allow for n > 256.
- Provide hooks for ggplot2 gradient and discrete scales
- Port over the Peter’s generation code from Julia / MATLAB to R.
James Balamuta and Peter Kovesi
CC BY-SA 4.0
About
CET Perceptually Uniform Colour Maps for R
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.

