cividis

Register `cividis` with matplotlib, a color map optimized for color vision deficiency, as published in Nuñez, et al. (2018), PLoS ONE 13(7): e0199239 .

https://github.com/benmaier/cividis

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: plos.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.5%) to scientific vocabulary

Keywords

cividis colormap cvd matplotlib
Last synced: 6 months ago · JSON representation

Repository

Register `cividis` with matplotlib, a color map optimized for color vision deficiency, as published in Nuñez, et al. (2018), PLoS ONE 13(7): e0199239 .

Basic Info
  • Host: GitHub
  • Owner: benmaier
  • License: other
  • Language: Python
  • Default Branch: master
  • Size: 71.3 KB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
cividis colormap cvd matplotlib
Created over 7 years ago · Last pushed over 7 years ago
Metadata Files
Readme License

README.md

cividis

Register the color map cividis for matplotlib, as described in

Nuñez JR, Anderton CR, Renslow RS (2018) Optimizing colormaps with consideration for color vision deficiency to enable accurate interpretation of scientific data. PLoS ONE 13(7): e0199239.

Install

pip install cividis

Usage

After installation, just import cividis once and it's registered and usable

python import cividis

Afterwards, you can use it like any other color map.

```python import matplotlib.pyplot as pl import numpy as np

x = np.arange(0, 2np.pi, 0.07) y = np.arange(0, 2np.pi, 0.07) X, Y = np.meshgrid(x,y) Z = np.cos(X) * np.sin(Y) * 20 Z += np.random.randn(*Z.shape)

pl.figure(figsize=(4,3.375)) pl.imshow(Z,cmap='cividis') pl.colorbar() pl.gcf().savefig('xmpl.png',dpi=150)

pl.show() ```

More examples

Register cividis as default

This has to be done once in your matplotlibrc file, or you call the corresponding function from the package.

```python import cividis cividis.make_default()

...

pl.imshow(Z) ```

Will give equal results to the above.

Get an array of N cividis colors

python import cividis color_list = cividis.get_colors(10,n_start=2,n_end=200)

Where the function is implemented as

``python def get_colors(N, n_start=0, n_end=255): """Get a color array ofNentries, where theNentries are taken at equidistance from thecividisarray between nstartandnend`"""

indices = np.linspace(n_start, n_end, N)
indices = np.array(indices, dtype=int)
return cividis[indices]

```

Owner

  • Name: Benjamin F. Maier
  • Login: benmaier
  • Kind: user
  • Location: Copenhagen
  • Company: Technical University of Denmark

Postdoc @suneman 's, generative art, electronic music. DTU Compute & SODAS.

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 4
  • Total Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Benjamin Maier b****r@g****m 4

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 13 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
pypi.org: cividis

Register `cividis` with matplotlib, a color map optimized for color vision deficiency, as published in Nuñez, et al. (2018), PLoS ONE 13(7): e0199239 .

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 13 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Stargazers count: 25.0%
Forks count: 29.8%
Average: 31.4%
Downloads: 70.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • matplotlib >=2.2
  • numpy >=1.14