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

scv.pl.proportions - percentage labels in the bar chart do not match bars when the clusters start on 1 instead of 0. #1092

Open
wendelljpereira opened this issue Jun 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@wendelljpereira
Copy link

wendelljpereira commented Jun 27, 2023

Dear scvelo team,

Thank you very much for generating this great tool.

I believe I found a minor bug on scv.pl.proportions.

I have 29 clusters stored as categorical values from 1 to 29.

adata.obs["seurat_clusters"]

Returns:

Name: seurat_clusters, Length: 36868, dtype: category
Categories (29, int64): [1, 2, 3, 4, ..., 26, 27, 28, 29]

When running :

scv.pl.proportions(adata, groupby='seurat_clusters')

I get the attached plot:
scvelo_proportions__splicing

Note that the last bar does not have a label, and the order of the bars' labels seems to be wrong by one. For example, the label of the bar representing cluster 17 is on the bar of cluster 16.

Could you please let me know if this is a bug or if I need to change something in my code?

Best Regards,
Wendell

Versions
scv.logging.print_versions()
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
scvelo==0.2.5  scanpy==1.9.3  anndata==0.9.1  loompy==3.0.7  numpy==1.24.4  scipy==1.11.0  matplotlib==3.7.1  sklearn==1.2.2  pandas==2.0.2  
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.
@wendelljpereira wendelljpereira added the bug Something isn't working label Jun 27, 2023
@wendelljpereira
Copy link
Author

If someone else has the same issue, you can save the image as an SVG file, then rearrange the labels using an image editor such as Illustrator or Inkscape.

The missing label is overlapped with the first box on the top right side of the image.

image

Hopefully, this will be an easy bug to fix.

Best Regards,
Wendell

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