scanpy icon indicating copy to clipboard operation
scanpy copied to clipboard

categories_order of sc.pl.tracksplot does not work

Open wubaosheng opened this issue 3 years ago • 5 comments

  • [x] I have checked that this issue has not already been reported.
  • [x] I have confirmed this bug exists on the latest version of scanpy.
  • [x] (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]

wubaosheng avatar May 05 '22 13:05 wubaosheng

Could you please provide a minimal working example? As stated: Minimal code sample (that we can copy&paste without having any data)

This would help us examine the issue.

Zethson avatar May 12 '22 08:05 Zethson

adata = sc.datasets.pbmc68k_reduced() markers = ['C1QA', 'PSAP', 'CD79A', 'CD79B', 'CST3', 'LYZ'] categories_order=['0','1','9','8','2','5','4','7','3','6','10'] sc.pl.tracksplot(adata,markers,groupby='louvain',vmax=3,categories_order=categories_order)

no mattet what the "categories_order" is, there is no work on the order of the label.Even the categories_order is error, such as categories_order = ['a','b','c','d'], the figure can not do anything on the order of the labels Uploading image.png…

wubaosheng avatar May 13 '22 01:05 wubaosheng

image

wubaosheng avatar May 13 '22 02:05 wubaosheng