{"id":21875542,"url":"https://github.com/callumrollo/cmcrameri","last_synced_at":"2025-05-16T03:03:08.058Z","repository":{"id":46178778,"uuid":"261810960","full_name":"callumrollo/cmcrameri","owner":"callumrollo","description":"Making Fabio Crameri's perceptually uniform colourmaps for geosciences available on PyPI and conda-forge","archived":false,"fork":false,"pushed_at":"2025-05-05T20:08:46.000Z","size":1398,"stargazers_count":161,"open_issues_count":3,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-05T21:25:37.574Z","etag":null,"topics":["colourmap","conda-forge","matplotlib","pypi","python","scientific-visualization"],"latest_commit_sha":null,"homepage":"http://www.fabiocrameri.ch/colourmaps.php","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/callumrollo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-06T16:04:02.000Z","updated_at":"2025-04-29T23:13:13.000Z","dependencies_parsed_at":"2022-09-14T13:20:59.715Z","dependency_job_id":"9aa1457a-e8bb-4f05-8391-063e37b1af25","html_url":"https://github.com/callumrollo/cmcrameri","commit_stats":{"total_commits":108,"total_committers":10,"mean_commits":10.8,"dds":0.4537037037037037,"last_synced_commit":"2548a67bcd4db9f81119669e0b81c7eac8fddf28"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callumrollo%2Fcmcrameri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callumrollo%2Fcmcrameri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callumrollo%2Fcmcrameri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callumrollo%2Fcmcrameri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/callumrollo","download_url":"https://codeload.github.com/callumrollo/cmcrameri/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459083,"owners_count":22074604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colourmap","conda-forge","matplotlib","pypi","python","scientific-visualization"],"created_at":"2024-11-28T07:41:43.691Z","updated_at":"2025-05-16T03:03:03.048Z","avatar_url":"https://github.com/callumrollo.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# cmcrameri\n\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n\n![python versions](https://img.shields.io/pypi/pyversions/cmcrameri.svg)\n\n![pypi](https://badge.fury.io/py/cmcrameri.svg) [![Downloads](https://pepy.tech/badge/cmcrameri)](https://pepy.tech/project/cmcrameri)\n\n![anaconda badge](https://anaconda.org/conda-forge/cmcrameri/badges/version.svg) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cmcrameri.svg)](https://anaconda.org/conda-forge/cmcrameri)\n\n\nThis is a Python wrapper around Fabio Crameri's perceptually uniform colormaps.\n\n\u003chttps://www.fabiocrameri.ch/colourmaps/\u003e\n\nAll credit for creating the colormaps to Fabio.\nAny errors in the Python implementation of colormaps are my own.\n\nThis version is based on _Scientific colour maps_ [version 8.0](https://doi.org/10.5281/zenodo.8035877) (2023-06-14).\n\n## Install\n\nWith `pip`:\n\n```sh\npython -m pip install cmcrameri\n```\n\nWith `conda`:\n\n```sh\nconda install -c conda-forge cmcrameri\n```\n\n## Usage example\n\n```python\nimport cmcrameri.cm as cmc\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nx = np.linspace(0, 1, 100)[np.newaxis, :]\n\nplt.imshow(x, aspect='auto', cmap=cmc.batlow)\nplt.axis('off')\nplt.show()\n```\n\nFor a discretized colormap like batlow split into 25 levels, you can use the [`.resampled`](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.ListedColormap.html#matplotlib.colors.ListedColormap.resampled) method on any of the colormaps:\n\n```\nplt.imshow(x, aspect='auto', cmap=cmc.batlow.resampled(25))\n```\n\nAlternatively, the registered name string can be used.\n\n```python\nimport cmcrameri # required in order to register the colormaps with Matplotlib\n...\nplt.imshow(x, aspect='auto', cmap='cmc.batlow')\n```\n\n## Extra instructions\n\nYou can access all the core colormaps from Fabio Crameri's list by `cmcrameri.cm.\u003ccolormapname\u003e`.\n\nYou can use tab autocompletion on `cmcrameri.cm` if your editor supports it.\n\nFor a reversed colormap, append `_r` to the colormap name.\n\nCategorical colormaps have the suffix `S`.\n\nFor an image of all the available colormaps without leaving the comfort of your Python session:\n\n```python\nfrom cmcrameri import show_cmaps\n\nshow_cmaps()\n```\n\n![Figure demonstrating the colormaps](cmcrameri/colormaps.png)\n\nThe original colormap text files are shipped as part of the package.\nFind them on your system with:\n\n```python\nfrom cmcrameri.cm import paths\n\npaths\n```\n\n## License\n\nThis work is licensed under an [MIT license](https://mit-license.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallumrollo%2Fcmcrameri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcallumrollo%2Fcmcrameri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallumrollo%2Fcmcrameri/lists"}