• Stars
    star
    401
  • Rank 103,596 (Top 3 %)
  • Language
    R
  • License
    Other
  • Created almost 6 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Palettes for R based on the Scientific Colour-Maps

scico

R-CMD-check CRAN_Release_Badge Codecov test coverage

This is a small package to provide access to the colour palettes developed by Fabio Crameri and published at http://www.fabiocrameri.ch/colourmaps.php. It uses more or less the same api as viridis and provides scales for ggplot2 without requiring ggplot2 to be installed.

Installation

scico can be installed from CRAN with install.packages('scico'). If you want the development version then install directly from GitHub:

# install.packages("devtools")
devtools::install_github("thomasp85/scico")

Palettes

scico provides 35 different palettes, all of which are perceptually uniform and colourblind safe. An overview can be had with the scico_palette_show() function:

library(scico)

scico_palette_show()

Once you’ve decided on a palette you can generate colour values using the scico() function:

scico(30, palette = 'lapaz')
#>  [1] "#190C65" "#1D196C" "#1E2575" "#202F7D" "#223A85" "#25448B" "#274E92"
#>  [8] "#2A5898" "#2E629D" "#336CA1" "#3774A3" "#3F7DA5" "#4886A6" "#528EA6"
#> [15] "#5F95A5" "#6C9AA3" "#7A9E9F" "#87A19A" "#95A494" "#A2A58F" "#ADA78B"
#> [22] "#BBA989" "#CAAD8A" "#DBB592" "#EBC0A0" "#F6CCB0" "#FBD7C2" "#FDE0D2"
#> [29] "#FFEAE2" "#FFF2F2"

ggplot2 support

scico provides relevant scales for use with ggplot2. It only suggests ggplot2 in order to stay lightweight, but if ggplot2 is available you’ll have access to the scale_[colour|fill]_scico() functions:

library(ggplot2)
volcano <- data.frame(
  x = rep(seq_len(ncol(volcano)), each = nrow(volcano)),
  y = rep(seq_len(nrow(volcano)), ncol(volcano)),
  height = as.vector(volcano)
)
ggplot(volcano, aes(x = x, y = y, fill = height)) + 
  geom_raster() + 
  scale_fill_scico(palette = 'davos') 

References

  • Crameri, Fabio. (2021, September 12). Scientific colour maps (Version 7.0.1). Zenodo. doi: 10.5281/zenodo.5501399
  • Crameri, Fabio. (2018). Geodynamic diagnostics, scientific visualisation and StagLab 3.0. Geosci. Model Dev. Discuss. doi: 10.5194/gmd-2017-328

More Repositories

1

patchwork

The Composer of ggplots
R
2,354
star
2

gganimate

A Grammar of Animated Graphics
R
1,920
star
3

ggraph

Grammar of Graph Graphics
R
1,032
star
4

ggforce

Accelerating ggplot2
R
898
star
5

tidygraph

A tidy API for graph manipulation
R
529
star
6

ggplot2_workshop

Material for "Drawing Anything with ggplot2" workshop
481
star
7

lime

Local Interpretable Model-Agnostic Explanations (R port of original Python package)
R
478
star
8

tweenr

Interpolate your data
R
395
star
9

fiery

A flexible and lightweight web server
R
239
star
10

shinyFiles

A shiny extension for server side file access
JavaScript
188
star
11

ggfx

Filters and Shaders for 'ggplot2'
R
161
star
12

densityClust

Clustering by fast search and find of density peaks
R
149
star
13

particles

A particle simulation engine based on a port of d3-force
R
118
star
14

transformr

Smooth Polygon Transformations
R
116
star
15

farver

High Performance Colourspace Manipulation in R
R
112
star
16

ambient

A Generator of Multidimensional Noise
R
91
star
17

euclid

Exact Computation Geometry Framework Based on 'CGAL'
C++
82
star
18

hierarchicalSets

Scalable Set Visualization using Hierarchies
R
54
star
19

Hr

Easy Access to Uppercase H
R
53
star
20

routr

Routing of Web Requests in R
R
53
star
21

reqres

Powerful classes for http requests and responses
R
36
star
22

curry

Partial Function Application with %<%, %-<%, and %><%
R
30
star
23

FindMyFriends

Fast alignment-free pangenome creation and exploration
R
27
star
24

pipeplotter

Syntactic ggplot2 Sugar for a Tidy World
R
26
star
25

fawkes

An R Interface to the AxiDraw plotter
R
25
star
26

pearls

Operations on Lists of Data Frames
R
18
star
27

ink

The Modern, High-Performant, Graphic Device for R
C++
17
star
28

PanVizGenerator

Create your own PanViz visualizations
R
17
star
29

ggplot2_mechanics

The Mechanics of ggplot2
TeX
16
star
30

plotting_benchmark

Investigating R graphics performance
HTML
16
star
31

grid

personal devel version of grid
R
15
star
32

PanViz

D3 based visualisation for comparative genomics
JavaScript
14
star
33

boundaries

Algorithms for Working With and Modifying Polygon Boundaries
C++
13
star
34

data_imaginist

data_imaginist source
HTML
12
star
35

nanodev

Graphic Devices for R based on NanoVG
C
10
star
36

MSGFgui

A gui overlay and extension for MSGFplus
R
10
star
37

orion

Spatial Searching for Euclid
C++
9
star
38

web_dev_in_R

Web Development for R Users
TeX
9
star
39

heroku-fiery-demo

A demo fiery application for deployment on Heroku
R
8
star
40

marquee

Markdown Parser and Renderer for R Graphics
C
8
star
41

unmeshy

A Vector Based 3D Renderer
C++
7
star
42

MSsary

Mass spectrometry data in R
R
7
star
43

RcppSNAP

'Rcpp' Integration for the SNAP Network Library
C++
6
star
44

tidy_graph_analysis

Tidy Network Analysis in R
TeX
6
star
45

polyclid

Polygon Support for Euclid
C++
6
star
46

mzID

An mzIdentML parser for R
R
6
star
47

MSGFplus

An MSGF+ interface for R
R
6
star
48

thomasp85.github.io

The source for data-imaginist.com
HTML
6
star
49

mvpcran

CRAN on a stick
R
5
star
50

shady

Compile and Execute Shaders from R
C++
5
star
51

anomaly

Detecting those outliers
R
4
star
52

d3Disco

A showcase for Shiny and D3 integration
JavaScript
4
star
53

firedock

Dockerfiles for fiery
R
4
star
54

phd_dissertation

Pangenome Tools for Rapid, Large-Scale Analysis of Bacterial Genomes
TeX
4
star
55

pepmaps

R package for quantitative peptidomics
R
2
star
56

masochist

For some reason I’m doing all of this from my phone
R
2
star
57

firedock_test

R
1
star
58

firesafety

Security for fiery apps
1
star
59

Biotools

Scripts for CMG-Biotools
Perl
1
star
60

circosScripts

Perl scripts to automate circos plots
Perl
1
star
61

CHtools

A list of diverse functions for CH
R
1
star