From 3a338b4a0e54fe9095ca6f7b5bd4f6a9d7c4b603 Mon Sep 17 00:00:00 2001 From: Blampey Quentin Date: Wed, 22 May 2024 17:31:48 +0200 Subject: [PATCH] hotfix matplotlib get_cmap --- CHANGELOG.md | 4 ++++ pyproject.toml | 2 +- scyan/plot/_scanpy_plot/umap.py | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a424ed8..2dd35f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.6.2] - 2024-05-22 + +Hotfix: use get_cmap from matplotlib.pyplot (#35) + ## [1.6.1] - 2024-04-08 Rename `correct_spillover` -> `compensate` diff --git a/pyproject.toml b/pyproject.toml index e9c40da..220d082 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scyan" -version = "1.6.1" +version = "1.6.2" description = "Single-cell Cytometry Annotation Network" documentation = "https://mics-lab.github.io/scyan/" homepage = "https://mics-lab.github.io/scyan/" diff --git a/scyan/plot/_scanpy_plot/umap.py b/scyan/plot/_scanpy_plot/umap.py index ff2647a..f3e795a 100644 --- a/scyan/plot/_scanpy_plot/umap.py +++ b/scyan/plot/_scanpy_plot/umap.py @@ -16,7 +16,6 @@ from matplotlib import pyplot as pl from matplotlib import rcParams from matplotlib.axes import Axes -from matplotlib.cm import get_cmap from matplotlib.collections import PatchCollection from matplotlib.colors import Colormap, Normalize, is_color_like from matplotlib.figure import Figure @@ -323,7 +322,7 @@ def scanpy_pl_umap( raise ValueError("Cannot specify both `color_map` and `cmap`.") else: cmap = color_map - cmap = copy(get_cmap(cmap)) + cmap = copy(pl.get_cmap(cmap)) cmap.set_bad(na_color) kwargs["cmap"] = cmap # Prevents warnings during legend creation