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 .
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
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
Metadata Files
README.md
cividis
Register the color map cividis for matplotlib, as described in
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
- Website: benmaier.org
- Twitter: benfmaier
- Repositories: 101
- Profile: https://github.com/benmaier
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
Top Committers
| Name | 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 .
- Homepage: https://www.github.com/benmaier/cividis
- Documentation: https://cividis.readthedocs.io/
- License: MIT
-
Latest release: 0.0.2
published over 7 years ago
Rankings
Maintainers (1)
Dependencies
- matplotlib >=2.2
- numpy >=1.14