cmyt


Namecmyt JSON
Version 2.0.1 PyPI version JSON
download
home_pageNone
SummaryA collection of Matplotlib colormaps from the yt project
upload_time2024-11-26 14:05:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseBSD 3-Clause
keywords visualization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cmyt

[![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt)

[![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml)
[![CI (bleeding edge)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/cmyt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main)

[![yt-project](https://img.shields.io/static/v1?label="works%20with"&message="yt"&color="blueviolet")](https://yt-project.org)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)

<a href="http://yt-project.org"><img src="https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png" width="150"></a>

Matplotlib colormaps from the yt project !

## Colormaps overview

The following colormaps, as well as their respective reversed (`*_r`) versions are available

### Perceptually uniform sequential colormaps
<p align="center">
    <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_perceptually_uniform.png" width="800"></a>
</p>

### Monochromatic sequential colormaps
<p align="center">
    <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_pixel.png" width="800"></a>
</p>

### Miscellaneous
<p align="center">
    <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_misc.png" width="800"></a>
</p>

## Installation

with `pip`
```shell
python -m pip install cmyt
```
or with `conda`
```shell
conda install -c conda-forge cmyt
```

## Usage
cmyt integrates with matplotlib in a similar fashion to
[cmocean](https://matplotlib.org/cmocean/) or
[cmasher](https://cmasher.readthedocs.io)
```python
import numpy as np
import matplotlib.pyplot as plt
import cmyt  # that's it !

# generate example data
prng = np.random.RandomState(0x4D3D3D3)
noise = prng.random_sample((100, 100))
x, y = np.mgrid[-50:50, -50:50]
z = 5 * np.exp(-(x**2 + y**2) / 1000)

# setup the figure
fig, ax = plt.subplots()
ax.set(aspect="equal")

# now we can refer to cmyt colormaps as strings
im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat")
fig.colorbar(im, ax=ax)
```
<p align="center">
    <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo.png" width="400"></a>
</p>

```python
# alternatively, cmyt maps can also be imported as objects
from cmyt import pastel

fig, ax = plt.subplots()
ax.set(aspect="equal")
im = ax.contourf(x, y, z + noise, cmap=pastel)
fig.colorbar(im, ax=ax)
```
<p align="center">
    <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo_alt.png" width="400"></a>
</p>

A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cmyt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "visualization",
    "author": null,
    "author_email": "The yt project <yt-dev@python.org>",
    "download_url": "https://files.pythonhosted.org/packages/2b/b3/3b914f2d904938630ceac2e069212fd83be977be92449449e7787d7b3e3c/cmyt-2.0.1.tar.gz",
    "platform": null,
    "description": "# cmyt\n\n[![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt)\n\n[![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml)\n[![CI (bleeding edge)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/cmyt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main)\n\n[![yt-project](https://img.shields.io/static/v1?label=\"works%20with\"&message=\"yt\"&color=\"blueviolet\")](https://yt-project.org)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)\n\n<a href=\"http://yt-project.org\"><img src=\"https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png\" width=\"150\"></a>\n\nMatplotlib colormaps from the yt project !\n\n## Colormaps overview\n\nThe following colormaps, as well as their respective reversed (`*_r`) versions are available\n\n### Perceptually uniform sequential colormaps\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_perceptually_uniform.png\" width=\"800\"></a>\n</p>\n\n### Monochromatic sequential colormaps\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_pixel.png\" width=\"800\"></a>\n</p>\n\n### Miscellaneous\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_misc.png\" width=\"800\"></a>\n</p>\n\n## Installation\n\nwith `pip`\n```shell\npython -m pip install cmyt\n```\nor with `conda`\n```shell\nconda install -c conda-forge cmyt\n```\n\n## Usage\ncmyt integrates with matplotlib in a similar fashion to\n[cmocean](https://matplotlib.org/cmocean/) or\n[cmasher](https://cmasher.readthedocs.io)\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport cmyt  # that's it !\n\n# generate example data\nprng = np.random.RandomState(0x4D3D3D3)\nnoise = prng.random_sample((100, 100))\nx, y = np.mgrid[-50:50, -50:50]\nz = 5 * np.exp(-(x**2 + y**2) / 1000)\n\n# setup the figure\nfig, ax = plt.subplots()\nax.set(aspect=\"equal\")\n\n# now we can refer to cmyt colormaps as strings\nim = ax.pcolormesh(x, y, z + noise, cmap=\"cmyt.arbre\", shading=\"flat\")\nfig.colorbar(im, ax=ax)\n```\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo.png\" width=\"400\"></a>\n</p>\n\n```python\n# alternatively, cmyt maps can also be imported as objects\nfrom cmyt import pastel\n\nfig, ax = plt.subplots()\nax.set(aspect=\"equal\")\nim = ax.contourf(x, y, z + noise, cmap=pastel)\nfig.colorbar(im, ax=ax)\n```\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo_alt.png\" width=\"400\"></a>\n</p>\n\nA gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline).\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause",
    "summary": "A collection of Matplotlib colormaps from the yt project",
    "version": "2.0.1",
    "project_urls": {
        "Homepage": "https://yt-project.org/",
        "Source": "https://github.com/yt-project/cmyt/",
        "Tracker": "https://github.com/yt-project/cmyt/issues"
    },
    "split_keywords": [
        "visualization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6b333d28d51b70ed95b2c47a4b2e6550b212fb7c037aac1fa08324b77880237",
                "md5": "a27f410511ae1d7b9da4fcf165251cfa",
                "sha256": "0c866420afb97dae85aad9b73f0a6a5f568ca08fafbef3c2870c949a38c252ec"
            },
            "downloads": -1,
            "filename": "cmyt-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a27f410511ae1d7b9da4fcf165251cfa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 30155,
            "upload_time": "2024-11-26T14:05:30",
            "upload_time_iso_8601": "2024-11-26T14:05:30.488691Z",
            "url": "https://files.pythonhosted.org/packages/e6/b3/33d28d51b70ed95b2c47a4b2e6550b212fb7c037aac1fa08324b77880237/cmyt-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2bb33b914f2d904938630ceac2e069212fd83be977be92449449e7787d7b3e3c",
                "md5": "3a0c9a203a02f36ec1c11cc43b7dee8d",
                "sha256": "a24c5cf765458fa8ed6b70c37d9531cdd8ae79ae96f916d26a3c3c169b18346e"
            },
            "downloads": -1,
            "filename": "cmyt-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3a0c9a203a02f36ec1c11cc43b7dee8d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 27662,
            "upload_time": "2024-11-26T14:05:32",
            "upload_time_iso_8601": "2024-11-26T14:05:32.407141Z",
            "url": "https://files.pythonhosted.org/packages/2b/b3/3b914f2d904938630ceac2e069212fd83be977be92449449e7787d7b3e3c/cmyt-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-26 14:05:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yt-project",
    "github_project": "cmyt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cmyt"
}
        
Elapsed time: 0.37744s