All Projects → marcosci → cividis

marcosci / cividis

Licence: other
Cividis color scale for R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to cividis

Ggforce
Accelerating ggplot2
Stars: ✭ 640 (+1460.98%)
Mutual labels:  ggplot-extension
Gganimate
A Grammar of Animated Graphics
Stars: ✭ 1,744 (+4153.66%)
Mutual labels:  ggplot-extension
Gghalves
✂️ Easy half-half geoms in ggplot2
Stars: ✭ 174 (+324.39%)
Mutual labels:  ggplot-extension
Ggdistribute
ggplot2 extension for plotting distributions
Stars: ✭ 16 (-60.98%)
Mutual labels:  ggplot-extension
Ggpol
🌍 Parliament diagrams and more for ggplot2
Stars: ✭ 71 (+73.17%)
Mutual labels:  ggplot-extension
Ggh4x
ggplot extension: options for tailored facets, multiple colourscales and miscellaneous
Stars: ✭ 148 (+260.98%)
Mutual labels:  ggplot-extension
Ggsignif
Easily add significance brackets to your ggplots
Stars: ✭ 322 (+685.37%)
Mutual labels:  ggplot-extension
SciColorMaps
Custom .NET color maps (user-defined or imported from matplotlib) for scientific visualization
Stars: ✭ 26 (-36.59%)
Mutual labels:  colormap
Ggbernie
A ggplot2 geom for adding Bernie Sanders to ggplot2
Stars: ✭ 96 (+134.15%)
Mutual labels:  ggplot-extension
Calendr
Ready to print calendars with ggplot2
Stars: ✭ 161 (+292.68%)
Mutual labels:  ggplot-extension
Hrbrthemes
🔏 Opinionated, typographic-centric ggplot2 themes and theme components
Stars: ✭ 899 (+2092.68%)
Mutual labels:  ggplot-extension
Ggstatsplot
Enhancing `ggplot2` plots with statistical analysis 📊🎨📣
Stars: ✭ 1,121 (+2634.15%)
Mutual labels:  ggplot-extension
Patchwork
The Composer of ggplots
Stars: ✭ 2,002 (+4782.93%)
Mutual labels:  ggplot-extension
Ggraph
Grammar of Graph Graphics
Stars: ✭ 815 (+1887.8%)
Mutual labels:  ggplot-extension
Ggupset
Combination matrix axis for 'ggplot2' to create 'UpSet' plots
Stars: ✭ 218 (+431.71%)
Mutual labels:  ggplot-extension
Ggalt
🌎 Extra Coordinate Systems, Geoms, Statistical Transformations & Scales for 'ggplot2'
Stars: ✭ 561 (+1268.29%)
Mutual labels:  ggplot-extension
Lemon
🍋 Lemon --- Freshing up your ggplots
Stars: ✭ 147 (+258.54%)
Mutual labels:  ggplot-extension
SciencesPo
A tool set for analyzing political science data
Stars: ✭ 33 (-19.51%)
Mutual labels:  ggplot-extension
gradient-rs
A command line tool for playing with color gradients
Stars: ✭ 93 (+126.83%)
Mutual labels:  colormap
Econocharts
Microeconomics/macroeconomics charts in ggplot2
Stars: ✭ 161 (+292.68%)
Mutual labels:  ggplot-extension

cividis

Build Status codecov

Jamie R. Nuñez, Christopher R. Anderton, and Ryan S. Renslow recently introduced optimized color maps for the scientific community. This so-called "cividis" colormap is generated by optimizing the "viridis" colormap and is optimal for viewing by those with or without color vision deficiency (CVD), a different visual perception of colors that affects 8.5% of the human population. It is designed to be perfectly perceptually-uniform, both in regular form and also when converted to black-and-white, and can be perceived by readers with all forms of color blindness. The cividis colormap was developed as a Python module called "cmaputil".

Because of the high interest of the scientific community in R, we make this new colormap available for R!

This is how it looks like:

... and like this in action (coloring neutral landscape models from NLMR):

Installation

To install the developmental version of cividis, use the following R code:

# install.packages("devtools")
devtools::install_github("marcosci/cividis")

Example

This is a basic example which shows you how to solve a common problem:

## basic example code

# load packages
library(NLMR)
library(rasterVis)
library(cividis)

# simulate NLM
x <- nlm_random(ncol = 100,
                nrow = 100)

# plot it
gplot(x) +
 geom_tile(aes(fill = value)) +
 labs(x = "Easting",
      y = "Northing") +
 theme_nlm() +
 scale_fill_cividis(
    na.value = "transparent",
    name = "",
    guide = ggplot2::guide_colorbar(
      barheight = ggplot2::unit(40, units = "mm"),
      barwidth = ggplot2::unit(1, units = "mm"),
      draw.ulim = FALSE,
      title.hjust = 0.5,
      title.vjust = 1.5,
      label.hjust = 0.5
 )) -> p1
#> Scale for 'fill' is already present. Adding another scale for 'fill',
#> which will replace the existing scale.

Maintainer(s)

Marco Sciaini - [@msciain](https://twitter.com/msciain) - [email protected]

Author(s)

Marco Sciaini - [@msciain](https://twitter.com/msciain) - [email protected] Cédric Scherer - [@CedScherer](https://twitter.com/CedScherer) - [email protected]

References

The colormap in the cividis package was created and published by Jamie R. Nuñez and her colleagues.

The package is mainly a cheeky copy of the beautiful viridis package for R that was created by Simon Garnier, Noam Ross, and Bob Rudis.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].