Skip to content

Commit

Permalink
hotfix matplotlib get_cmap
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinblampey committed May 22, 2024
1 parent 53ad9ba commit 3a338b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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/"
Expand Down
3 changes: 1 addition & 2 deletions scyan/plot/_scanpy_plot/umap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3a338b4

Please sign in to comment.