Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color specified as array fails in scv.pl.scatter #892

Open
WeilerP opened this issue Jun 26, 2022 · 0 comments
Open

Color specified as array fails in scv.pl.scatter #892

WeilerP opened this issue Jun 26, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@WeilerP
Copy link
Member

WeilerP commented Jun 26, 2022

Just a quick reminder so as not to forget. Will update ASAP: Specifying the argument c in scv.pl.scatter as an array when plotting gene expression on a UMAP, for example, leads to failure. The logging statement WARNING: Invalid color key. Using grey instead. is issued and only a single, grey plot is produced.

# TODO: Make reproducible example.
# `gene_names` defined as array
scv.pl.scatter(
    adata,
    basis='umap',
    c=gene_names[:20],
    cmap='viridis',
    legend_loc=None,
    colorbar=False,
    s=25,
    ncols=5
)

scv.pl.scatter(
    adata,
    basis='umap',
    c=gene_names[:20].tolist(),
    cmap='viridis',
    legend_loc=None,
    colorbar=False,
    s=25,
    ncols=5
)
Error output
# paste the error output here, if applicable
Versions
# paste the ouput of scv.logging.print_versions() here
@WeilerP WeilerP added the bug Something isn't working label Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant