Skip to content

Nothing is displayed in the image, but I can display it normally using official data in the same environment. #1022

@hwr9912

Description

@hwr9912
%reset -f
import scanpy as sc
import squidpy as sq
adata = sc.read("data/MCAO_1d.h5ad")
sq.pl.spatial_scatter(
    adata,
    color="Gfap",
    library_id="MCAO_1d",
    img=True,                 # 打开底图
    img_res_key="lowres",     # 指定用 lowres
    spatial_key="spatial",    # 你的坐标键
    # size=1.0,                 # 点大小(可调)
    cmap="magma",
    frameon=False
)
Image

What puzzles me most is that I can display spot very smoothly on Squidpy's official data.

%reset -f
import numpy as np
import pandas as pd

import anndata as ad
import scanpy as sc
import squidpy as sq

display(sc.logging.print_header())
print(f"squidpy=={sq.__version__}")

# load the pre-processed dataset
img = sq.datasets.visium_hne_image(path="data/hne_image")
adata = sq.datasets.visium_hne_adata(path="data/hne_adata")

sq.pl.spatial_scatter(
    adata,
    color="Gfap",
    use_raw=False,
    library_id="V1_Adult_Mouse_Brain",
    img=True,                 # 打开底图
    img_res_key="lowres",     # 指定用 lowres
    spatial_key="spatial",    # 你的坐标键
    size=1.0,                 # 点大小(可调)
    cmap="magma",
    frameon=False
)
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions