Default Color Maps from 'matplotlib'

Implementation of the 'viridis' - the default -, 'magma', 'plasma', 'inferno', and 'cividis' color maps for 'R'. 'viridis', 'magma', 'plasma', and 'inferno' are ported from 'matplotlib' < http://matplotlib.org/>, a popular plotting library for 'python'. 'cividis', was developed by Jamie R. Nuñez and Sean M. Colby. These color maps are designed in such a way that they will analytically be perfectly perceptually-uniform, both in regular form and also when converted to black-and-white. They are also designed to be perceived by readers with the most common form of color blindness (all color maps in this package) and color vision deficiency ('cividis' only).


Matplotlib recently [introduced new color maps] (http://matplotlib.org/style_changes.html) for their graphs. They are called viridis, magma, inferno, and plasma. viridis was made the new default color map of Matplotlib.

These four color maps are designed in such a way that they will analytically be perfectly perceptually-uniform, both in regular form and also when converted to black-and-white. They are also designed to be perceived by readers with the most common form of color blindness.

AND... they are pretty!

AND... they are now available for R!



viridis 0.3.3 is now available on CRAN.
You can install it using RStudio package manager or by typing the following line in your R terminal:

install.packages("viridis")
library(viridis)

If you prefer to install the development version from this GitHub repository, simply copy the following lines of code in your R terminal and it should install everything you need to use viridis on your computer:

if (!require("devtools")) install.packages("devtools")
devtools::install_github("sjmgarnier/viridis")
 
library(viridis)

See the vignette for more details.

Simon Garnier - @sjmgarnier - [email protected]


The color maps in the viridis package were created by Stéfan van der Walt (@stefanv) and Nathaniel Smith (@njsmith).

If you want to know more about the science behind the creation of these color maps, you can watch this presentation of viridis by their authors at SciPy 2015.

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("viridis")

0.5.1 by Simon Garnier, a year ago


https://github.com/sjmgarnier/viridis


Report a bug at https://github.com/sjmgarnier/viridis/issues


Browse source code at https://github.com/cran/viridis


Authors: Simon Garnier [aut, cre] , Noam Ross [ctb, cph] , Bob Rudis [ctb, cph] , Marco Sciaini [ctb, cph] , Cédric Scherer [ctb, cph]


Documentation:   PDF Manual  


Task views: Analysis of Spatial Data


MIT + file LICENSE license


Imports stats, ggplot2, gridExtra

Depends on viridisLite

Suggests hexbin, scales, MASS, knitr, dichromat, colorspace, rasterVis, httr, mapproj, vdiffr, svglite, testthat, covr, rmarkdown, rgdal


Imported by BMhyb, BNPdensity, BiBitR, CINNA, DiagrammeR, EHRtemporalVariability, ForestGapR, GGUM, Hmisc, IMIFA, Infusion, RcmdrPlugin.BiclustGUI, SIBER, SPUTNIK, TSstudio, VRPM, bayesvl, behaviorchange, c3, clustMD, clustree, dendextend, dissever, distantia, distreg.vis, eemR, eesim, effectR, evaluator, getTBinR, ggraph, leaflet, memoria, mgcViz, mptools, nandb, naniar, noaastormevents, pdp, permutes, pterrace, quadmesh, rmweather, rwty, shinyHeatmaply, simmr, skpr, spatialrisk, spectralAnalysis, survivALL, tabularaster, tadaatoolbox, theseus, trip, ufs, userfriendlyscience, viewshed3d, virtualPollen, wilson.

Depended on by heatmaply, reinsureR.

Suggested by ARPobservation, CSFA, IceCast, QPot, Rmagic, autoimage, colorspace, cytometree, eclust, gbm, getCRUCLdata, ggridges, glmmfields, grattan, httk, kernelTDA, lineqGPR, metR, pdSpecEst, pksensi, platetools, powerlmm, radiomics, rayshader, refuge, ropenaq, rsimsum, spant, spbabel, spectralGraphTopology, stacomiR, stars, stormwindmodel, sugrrants, themetagenomics.


See at CRAN