spatialdata-plot icon indicating copy to clipboard operation
spatialdata-plot copied to clipboard

Shape's outline color from a table column

Open marcovarrone opened this issue 2 years ago • 3 comments

Currently, the color of a set of shapes can be set according to a column in the table, but for the outline, it's only possible to specify a single color common to all shapes.

I would like to propose the possibility to select different outline colors for different shapes.

My use case is that I automatically generate annotated regions around certain groups of cells and I want to display only the outline because these regions can contain heterogeneous cells (colored + grey) that I still want to be able to show, as in the example in the following image.

If you think it's a good idea I can attempt a PR :)

image

marcovarrone avatar Aug 04 '23 12:08 marcovarrone

Hi @marcovarrone, the addition of this feature would very nice, if you could propose a PR it would be super! We are happy to review it and assist you with technical questions.

LucaMarconato avatar Aug 15 '23 14:08 LucaMarconato

btw should also specify that you can achieve something similar by using the contour argument, instead of the outline, which leverages https://scikit-image.org/docs/stable/api/skimage.morphology.html#skimage.morphology.erosion

giovp avatar Aug 28 '23 15:08 giovp