Starlitnightly / omicverse

A python library for multi omics included bulk, single cell and spatial RNA-seq analysis.
https://starlitnightly.github.io/omicverse/
GNU General Public License v3.0
274 stars 32 forks source link

Could not show the pictures after run the code "ov.utils.embedding" in WSL2 #51

Closed DestinyXuanQAQ closed 2 months ago

DestinyXuanQAQ commented 5 months ago

Describe the bug Previously, running this code in WSL1 allowed images to appear, but after a recent I update it to WSL2 and this code does not allow images to appear anymore. The version is 1.5.6

To Reproduce Steps to reproduce the behavior:

ov.pp.scale(adata) ov.pp.pca(adata,layer='scaled',n_pcs=50)

adata.obsm["X_mde_pca"] = ov.utils.mde(adata.obsm["scaled|original|X_pca"]) ov.utils.embedding(adata, basis='X_mde_pca',frameon='small', color=['batch','cell_type'],show=False)

it just exports

[<AxesSubplot: title={'center': 'batch'}, xlabel='X_mde_pca1', ylabel='X_mde_pca2'>, <AxesSubplot: title={'center': 'cell_type'}, xlabel='X_mde_pca1', ylabel='X_mde_pca2'>]

Expected behavior It will export a picture to show me the picture about the results of PCA analysis.

Screenshots 1705302834220

Desktop (please complete the following information):

Additional context I tried to install Xlaunch to deal with this, and the matplotlib code outputs the image properly, but this code still doesn't work.

Starlitnightly commented 5 months ago

You need to add %matplotlib inline before your code.

Zehua