scverse / scverse/scanpy

categories_order of sc.pl.tracksplot does not work

Open
#2,250 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Plotting 🌺
Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of scanpy.
  • (optional) I have confirmed this bug exists on the master branch of scanpy.

Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Minimal code sample (that we can copy&paste without having any data)
categories_order=['0','1','9','8','2','5','4','7','3','6']
sc.pl.tracksplot(adata,markers,groupby='leiden',vmax=3,categories_order=categories_order)
[Paste the error output produced by the above code here]

image
I can not get the order as ['0','1','9','8','2','5','4','7','3','6']

Versions

1.9.1

[Paste the output of scanpy.logging.print_versions() leaving a blank line after the details tag]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the sc.pl.tracksplot entry point and reproduce the example with categories_order, using the referenced image as the expected ordering. Trace how the groupby categories are passed into the plot and confirm that the displayed order matches ['0','1','9','8','2','5','4','7','3','6']; the report lacks a complete runnable dataset and error output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.