You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Categorical Data is incorrectly colored in the legend when plotting #214
When using pl.render_labels with the color and palette parameter, the legends are incorrectly colored.
Example Plot:
Here we see that the Dot plot from scanpy counts 1.1K cells in the cluster NBL_9 and colors them with pastel green (correct color). However on the spatialdata plots, cluster NBL_11 is pastel green, when it should be NBL_9. The colors on the spatialdata image itself are not wrong, it is the colors on the legend which are incorrect.
This issue is occurs in pl.utils._get_palette, where the values in thecategories gets mapped to the colors of the palette. However in scanpy it's the categories of the DataFrame which get mapped to the colors.
Activity