spatialdata-plot
spatialdata-plot copied to clipboard
Use spaco for picking colors?
Without having tried it yet, the figure looks convincingly nice. Basically calculates the degree of mixture of all cell type pairs and then maximises contrast based on the given palette.
Potential drawback could be runtime for something as simple as picking a palette.
https://www.cell.com/patterns/fulltext/S2666-3899(23)00324-0?_returnURL=https%3A%2F%2Flinkinghub.elsevier.com%2Fretrieve%2Fpii%2FS2666389923003240%3Fshowall%3Dtrue
Wdyt @LucaMarconato @Sonja-Stockhaus @giovp @aeisenbarth
I like it a lot, but is there a way to reimplement instead of relying on the dependency?
Imports are kind of icky for just a plotting package, sklearn + umap. But probably required for the algo. We could have this as optional which only checks for those imports when palette='spaco'
Looks really nice! At a first look, I didn't find anything about runtime in the paper, so I guess we would just have to test it.
There are also https://github.com/thu-vis/Dynamic-Color and https://github.com/simonwarchol/psudo which could be explored (could be complementary to spaco)