Skip to content

Color leak when outline_alpha=1 and full_alpha=0 #461

Closed

Description

@LucaMarconato

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.

Activity

  1. MeyerBender commented on May 14, 2025

    @MeyerBender
    Contributor

    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.

  2. MeyerBender commented on Dec 19, 2025

    @MeyerBender
    Contributor

    Created a PR fixing this issue. Also, the two colorbars were the result of there being two images/labels in the blobs dataset (one normal and one multiscale). sdata.pl.render_images('blobs_image', channel=0).pl.render_labels('blobs_labels', outline_alpha=1, fill_alpha=0).pl.show() works as it should and only creates one colorbar.

  3. timtreis commented on Mar 29, 2026

    @timtreis
    Member

    Fixed with #525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions