Skip to content

Commit

Permalink
Use sc.pl.scatter in mu.pl.scatter
Browse files Browse the repository at this point in the history
  • Loading branch information
gtca committed Oct 16, 2024
1 parent 8182f6c commit 52f9e1d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions muon/_core/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
Expand All @@ -93,7 +90,6 @@ def scatter(
return retval



#
# Embedding
#
Expand Down

0 comments on commit 52f9e1d

Please sign in to comment.