{"id":20688055,"url":"https://github.com/1313e/cmasher","last_synced_at":"2025-05-14T19:05:02.821Z","repository":{"id":47960401,"uuid":"222056142","full_name":"1313e/CMasher","owner":"1313e","description":"Scientific colormaps for making accessible, informative and 'cmashing' plots","archived":false,"fork":false,"pushed_at":"2025-03-16T14:03:23.000Z","size":227755,"stargazers_count":444,"open_issues_count":9,"forks_count":29,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T20:01:41.323Z","etag":null,"topics":["colormaps","data-visualization","matplotlib","plotting","python","utility-functions"],"latest_commit_sha":null,"homepage":"https://cmasher.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1313e.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-16T06:15:58.000Z","updated_at":"2025-03-25T09:24:48.000Z","dependencies_parsed_at":"2024-01-16T07:23:01.219Z","dependency_job_id":"466aab45-ceab-4a79-8437-a9c815d4e1fd","html_url":"https://github.com/1313e/CMasher","commit_stats":{"total_commits":223,"total_committers":4,"mean_commits":55.75,"dds":0.04932735426008972,"last_synced_commit":"1e76ef900557e1a3aa40a7fe85a356d296f8379b"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1313e%2FCMasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1313e%2FCMasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1313e%2FCMasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1313e%2FCMasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1313e","download_url":"https://codeload.github.com/1313e/CMasher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550672,"owners_count":20956985,"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":["colormaps","data-visualization","matplotlib","plotting","python","utility-functions"],"created_at":"2024-11-16T22:58:58.484Z","updated_at":"2025-04-06T21:03:23.023Z","avatar_url":"https://github.com/1313e.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"|PyPI| |conda-forge| |Python| |GitHub| |JOSS|\n\n*CMasher*: Scientific colormaps for making accessible, informative and *cmashing* plots\n=======================================================================================\nThe *CMasher* package provides a collection of scientific colormaps and utility functions to be used by different *Python* packages and projects, mainly in combination with `matplotlib`_, showcased in the `online documentation`_ (where I also describe how to use the colormaps in other languages and applications).\nThe colormaps in *CMasher* are all designed to be perceptually uniform sequential using the `viscm`_ package; most of them are color-vision deficiency friendly; and they cover a wide range of different color combinations to accommodate for most applications.\nIt offers several alternatives to commonly used colormaps, like *chroma* and *rainforest* for *jet*; *sunburst* for *hot*; *neutral* for *binary*; and *fusion* and *redshift* for *coolwarm*.\nIf you cannot find your ideal colormap, then please open an `issue`_, provide the colors and/or style you want, and I will try to create one to your liking!\nLet's get rid of all bad colormaps in the world together!\n\n*If you use CMasher for your work, then please star the repo, such that I can keep track of how many users it has and more easily raise awareness of bad colormaps.*\n*Additionally, if you use CMasher as part of your workflow in a scientific publication, please consider citing the CMasher paper* (*BibTeX:* ``cmr.get_bibtex``).\n\n.. _issue: https://github.com/1313e/CMasher/issues\n.. _online documentation: https://cmasher.readthedocs.io\n.. _matplotlib: https://github.com/matplotlib/matplotlib\n.. _viscm: https://github.com/matplotlib/viscm\n\nColormap overview\n-----------------\nBelow is an overview of all the colormaps that are currently in *CMasher* (made with the ``cmr.create_cmap_overview()`` function).\nFor more information, see the `online documentation`_.\n\n.. image:: https://github.com/1313e/CMasher/raw/master/static/cmap_overview.png\n    :width: 100%\n    :align: center\n    :target: https://cmasher.readthedocs.io\n    :alt: CMasher Colormap Overview\n\nIn the figure, one can see this wide range of color combinations that *CMasher* has to offer, as I wanted to make sure that *CMasher* has a colormap for everyone.\nBecause of this, *CMasher*'s sequential colormaps range from single major color maps like *amber*; *ember*; *flamingo*; *freeze*; *gothic*; and *jungle*, to colormaps with high perceptual ranges like *apple*; *chroma*; *torch*; *neon*; and *rainforest*.\nThe diverging colormaps in *CMasher* have a similar variety, but more importantly, several of them have a black center instead of a white center, like *iceburn*; *redshift*; *watermelon*; and *wildfire*.\nBlack centered diverging colormaps are quite rare as most researchers are used to white centered ones, even though a black centered diverging colormap can be rather useful in certain cases, like plotting a radial velocity map (the further away from the common center, the higher the velocity in either direction, and thus the corresponding color should be brighter).\n\n\nInstallation \u0026 Use\n==================\nHow to install\n--------------\n*CMasher* can be easily installed directly from `PyPI`_ with::\n\n    $ pip install cmasher\n\nor from `conda-forge`_ with::\n\n    $ conda install -c conda-forge cmasher  # If conda-forge is not set up as a channel\n    $ conda install cmasher                 # If conda-forge is set up as a channel\n\nIf required, one can also clone the `repository`_ and install *CMasher* manually::\n\n    $ git clone https://github.com/1313e/CMasher\n    $ cd CMasher\n    $ pip install .\n\n*CMasher* can now be imported as a package with ``import cmasher as cmr``.\n\nBesides Python, *CMasher*'s colormaps can also be accessed in various other languages and applications.\nA list of all currently known languages and applications that support *CMasher* can be found in the online documentation `here \u003chttps://cmasher.readthedocs.io/user/usage.html#accessing-colormaps\u003e`_.\n\n.. _repository: https://github.com/1313e/CMasher\n.. _PyPI: https://pypi.org/project/CMasher\n.. _conda-forge: https://anaconda.org/conda-forge/CMasher\n\nExample use\n-----------\nThe colormaps shown above can be accessed by simply importing *CMasher*.\nThis makes them available in the ``cmasher`` module, in addition to registering them in *matplotlib*'s ``cm`` module (with added ``'cmr.'`` prefix to avoid name clashes).\nSo, for example, if one were to use the *rainforest* colormap, this could be done with:\n\n.. code:: python\n\n    # Import CMasher to register colormaps\n    import cmasher as cmr\n\n    # Import packages for plotting\n    import matplotlib as mpl\n    import matplotlib.pyplot as plt\n    import numpy as np\n\n    # Access rainforest colormap through CMasher or MPL\n    cmap = cmr.rainforest                   # CMasher\n    cmap = mpl.colormaps['cmr.rainforest']  # MPL\n\n    # Generate some data to plot\n    x = np.random.rand(100)\n    y = np.random.rand(100)\n    z = x**2+y**2\n\n    # Make scatter plot of data with colormap\n    plt.scatter(x, y, c=z, cmap=cmap, s=300)\n    plt.show()\n\nFor other use-cases, including an overview of *CMasher*'s utility functions and how to use *CMasher* in other programming languages and applications, see the `online documentation`_.\n\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/CMasher.svg?logo=pypi\u0026logoColor=white\u0026label=PyPI\n    :target: https://pypi.python.org/pypi/CMasher\n    :alt: PyPI - Latest Release\n.. |Python| image:: https://img.shields.io/pypi/pyversions/CMasher?logo=python\u0026logoColor=white\u0026label=Python\n    :target: https://pypi.python.org/pypi/CMasher\n    :alt: PyPI - Python Versions\n.. |GitHub| image:: https://img.shields.io/github/actions/workflow/status/1313e/CMasher/.github/workflows/test.yml?branch=dev\n    :target: https://github.com/1313e/CMasher/actions\n    :alt: GitHub Actions - Build Status\n\n.. |ReadTheDocs| image:: https://img.shields.io/readthedocs/cmasher/latest.svg?logo=read%20the%20docs\u0026logoColor=white\u0026label=Docs\n    :target: https://cmasher.readthedocs.io\n    :alt: ReadTheDocs - Build Status\n.. |JOSS| image:: https://img.shields.io/badge/JOSS-paper-brightgreen\n   :target: https://doi.org/10.21105/joss.02004\n   :alt: JOSS - Submission Status\n.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/cmasher.svg?logo=conda-forge\u0026logoColor=white\n    :target: https://anaconda.org/conda-forge/cmasher\n    :alt: Conda-Forge - Latest Release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1313e%2Fcmasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1313e%2Fcmasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1313e%2Fcmasher/lists"}