Default Color Maps from 'matplotlib'

Color maps designed to improve graph readability for readers with common forms of color blindness and/or color vision deficiency. The color maps are also perceptually-uniform, both in regular form and also when converted to black-and-white for printing. This package also contains 'ggplot2' bindings for discrete and continuous color and fill scales. A lean version of the package called 'viridisLite' that does not include the 'ggplot2' bindings can be found at < https://cran.r-project.org/package=viridisLite>.


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.6.0 by Simon Garnier, 24 days ago


https://sjmgarnier.github.io/viridis/, 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] , Antônio Pedro Camargo [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 BNPdensity, BiBitR, CINNA, DiagrammeR, EHRtemporalVariability, GGUM, Hmisc, Infusion, LDATS, PheVis, RcmdrPlugin.BiclustGUI, SPARSEMODr, SPUTNIK, SUMMER, SleepCycles, TSstudio, VDSM, accept, amber, aweSOM, bayesvl, behaviorchange, bioRad, c3, chronicle, clustMD, clustree, corHMM, dendextend, dendroTools, dissever, distantia, dynaSpec, dyngen, ecochange, ecorest, eemR, eesim, effectR, ergmclust, escalation, evaluator, foodingraph, forestr, geouy, ggraph, gwpcormapper, idmodelr, leaflet, lineartestr, loewesadditivity, memoria, mgcViz, mobirep, mptools, mstate, nandb, naniar, noaastormevents, nullabor, occCite, pdp, plotdap, qad, quadmesh, rmweather, rosetta, rwty, scUtils, semtree, simmr, simplevis, skpr, spatialrisk, spectralAnalysis, sptotal, tidyHeatmap, tidygate, trip, viewshed3d, virtualPollen, wilson, yaps, zGPS.AO.

Depended on by bsem, heatmaply, reinsureR.

Suggested by ARPobservation, CAST, CSFA, CoordinateCleaner, DSjobtracker, ENMTools, IceCast, MOSS, Rmagic, SFSI, SIBER, SimSurvey, arcos, baRulho, catmaply, colorspace, cytometree, eSDM, eclust, fastai, fsbrain, gbm, geocmeans, getCRUCLdata, ggpointdensity, ggside, glmmfields, grattan, himach, iNZightPlots, leri, lineqGPR, marqLevAlg, metR, metagam, moderndive, nosoi, palr, pdSpecEst, permutes, platetools, powerlmm, protti, rGEDI, rKOMICS, rangeMapper, rayshader, rsimsum, spbabel, spectralGraphTopology, stars, starvz, statebins, sugrrants, tcensReg, themetagenomics, tidyjson, torchaudio, ufs.


See at CRAN