Skip to content

Commit 4817b0d

Browse files
Merge pull request #82 from neutrinoceros/hotfix_mpl_3.2
BUG: fix compatibility for matplotlib 3.2
2 parents d47a750 + d2fd37d commit 4817b0d

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt)
44
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt)
5-
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/cmyt?v1.1.1&logo=python&logoColor=white&label=Python)](https://pypi.org/project/cmyt/)
5+
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/cmyt?v1.1.2&logo=python&logoColor=white&label=Python)](https://pypi.org/project/cmyt/)
66

77
[![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml)
88
[![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)

cmyt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .cm import *
22

3-
__version__ = "1.1.1"
3+
__version__ = "1.1.2"

cmyt/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ def _register_mpl_cmap(cmap: Colormap) -> None:
9595
if MPL_VERSION >= (3, 5, 0):
9696
matplotlib.colormaps.register(cmap)
9797
else:
98-
matplotlib.cm.register_cmap(cmap=cmap)
98+
from matplotlib.cm import register_cmap
99+
100+
register_cmap(cmap=cmap)
99101

100102

101103
def register_colormap(

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = cmyt
3-
version = 1.1.1
3+
version = 1.1.2
44
description = A collection of Matplotlib colormaps from the yt project
55
long_description = file: README.md
66
long_description_content_type = text/markdown

0 commit comments

Comments
 (0)