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

Color leak when `outline_alpha=1` and `full_alpha=0`

Open LucaMarconato opened this issue 6 months ago • 1 comments

Originally reported by @MeyerBender

  • normalization of channels: see differences between the two notebooks when plotting all channels but DAPI. I guess it is intentional that no normalization is performed by default, and it should be possible to normalize channels using the “norm” argument, but the documentation isn’t very clear on how to do this properly.

Using outline_alpha=1 and full_alpha=0 leads to plots like this one (notebook here):

Image

Probably the erosion step misses some pixels.

LucaMarconato avatar May 13 '25 22:05 LucaMarconato

Example code snippet:

import spatialdata as sd
import spatialdata_plot
from spatialdata.datasets import blobs

sdata = blobs()
sdata.pl.render_images(channel=0).pl.render_labels(outline_alpha=1, fill_alpha=0).pl.show()
Image

For some reason this also creates two colorbars, not sure why.

MeyerBender avatar May 14 '25 07:05 MeyerBender