Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/spatialdata_plot/pl/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,11 @@ def _draw_labels(
if effective_outline_color is None and col_for_color is None and render_params.color is not None:
effective_outline_color = render_params.color

if render_params.fill_alpha == 0.0 and render_params.outline_alpha == 0.0:
raise ValueError(
"Parameters 'fill_alpha' and 'outline_alpha' cannot both be 0. Set at least one to a positive value."
)

# default case: no contour, just fill
# since contour_px is passed to skimage.morphology.erosion to create the contour,
# any border thickness is only within the label, not outside. Therefore, the case
Expand Down
Loading