https://github.com/pangeo-data/xcmocean
xarray accessor for automating choosing colormaps, aimed at geosciences
https://github.com/pangeo-data/xcmocean
colormap geosciences xarray-accessor
Last synced: 11 months ago
JSON representation
xarray accessor for automating choosing colormaps, aimed at geosciences
- Host: GitHub
- URL: https://github.com/pangeo-data/xcmocean
- Owner: pangeo-data
- License: mit
- Created: 2020-10-06T20:24:13.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-27T23:35:09.000Z (over 2 years ago)
- Last Synced: 2024-06-11T16:34:50.678Z (over 1 year ago)
- Topics: colormap, geosciences, xarray-accessor
- Language: Python
- Homepage: http://xcmocean.readthedocs.io
- Size: 614 KB
- Stars: 22
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xcmocean
[](https://github.com/pangeo-data/xcmocean/actions)
[](https://codecov.io/gh/pangeo-data/xcmocean)
[](https://opensource.org/licenses/MIT)
[](https://xcmocean.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/pangeo-data/xcmocean/actions)
[](https://anaconda.org/conda-forge/xcmocean)
[](https://pypi.org/project/xcmocean)
xarray accessor for automating choosing colormaps, aimed at geosciences.
Also optional dependence on `cf-xarray`.
--------
Project based on the cookiecutter science project template.
## Installation:
You can pip install from PyPI:
```
pip install xcmocean
```
or install from conda-forge with
```
conda install -c conda-forge xcmocean
```
## Example usage:
```
import xcmocean
ds.salt.cmo.contourf(x='lon', y='lat')
```
which would make a `contourf` plot of the `ds.salt` data using the `cmocean` `haline` colormap. More examples in the docs.
## Dev installation for local work
Clone the repo:
```
$ git clone https://github.com/pangeo-data/xcmocean.git
```
In the `xcmocean` directory, install conda environment:
```
$ conda env create -f environment.yml
```
To also develop this package, install additional packages with:
```
$ conda install --file requirements-dev.txt
```
To then check code before committing and pushing it to github, locally run
```
$ pre-commit run --all-files
```