From 52f9e1d8d53cb1cc0d01edb66f45fb7b38ecb18b Mon Sep 17 00:00:00 2001 From: Danila Date: Wed, 16 Oct 2024 16:36:56 -0700 Subject: [PATCH] Use sc.pl.scatter in mu.pl.scatter --- muon/_core/plot.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/muon/_core/plot.py b/muon/_core/plot.py index 7d72f3e..752518c 100644 --- a/muon/_core/plot.py +++ b/muon/_core/plot.py @@ -53,9 +53,7 @@ def scatter( No layer is used by default. A single layer value will be expanded to [layer, layer, layer]. """ if isinstance(data, AnnData): - return sc.pl.embedding( - data, x=x, y=y, color=color, use_raw=use_raw, layers=layers, **kwargs - ) + return sc.pl.scatter(data, x=x, y=y, color=color, use_raw=use_raw, layers=layers, **kwargs) if isinstance(layers, str) or layers is None: layers = [layers, layers, layers] @@ -74,7 +72,6 @@ def scatter( color_obs = pd.DataFrame({color: color_obs}) else: raise TypeError("Expected color to be a string.") - color_obs.index = data.obs_names obs = pd.concat([obs, color_obs], axis=1, ignore_index=False) @@ -93,7 +90,6 @@ def scatter( return retval - # # Embedding #