JinmiaoChenLab / GraphST

GNU Affero General Public License v3.0
86 stars 9 forks source link

Color error in sc.pl.embedding() #9

Closed Tripfantasy closed 1 year ago

Tripfantasy commented 1 year ago

Hello, thank you for this tool! I am trying to follow along the stereoseq tutorial, and am running into an issue with the sc.pl.embedding() color argument being set to "domain"?

The visualization code chunk:

# Visualization
adata.obsm['spatial'][:, 1] = -1*adata.obsm['spatial'][:, 1]
plt.rcParams["figure.figsize"] = (3,4)
plot_color = ["#F56867","#556B2F","#C798EE","#59BE86","#006400","#8470FF","#CD69C9","#EE7621","#B22222","#FFD700","#CD5555","#DB4C6C","#8B658B","#1E90FF","#AF5F3C","#CAFF70", "#F9BD3F","#DAB370","#877F6C","#268785", '#82EF2D', '#B4EEB4']

ax = sc.pl.embedding(adata, basis= "spatial", color = "domain", s = 30, show = False, palette = plot_color, title = 'GraphST')
ax.axis('off')
ax.set_title('Mouse Embryo E9.5')

My error:

/home/dm2763/micromamba/envs/GraphST/lib/python3.10/site-packages/scanpy/plotting/_tools/scatterplots.py:392: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
  cax = scatter(

mclust appears to be running correctly. The script just stops upon reaching the plotting portion. I appreciate any help you can send my way. Thanks!

Tripfantasy commented 1 year ago

I ignored the warning, and it seems to produce expected output.

Added: plt.savefig('graphst_embryo_e9.5.png', dpi=300, bbox_inches='tight')