Skip to content

Commit a9b8c10

Browse files
committed
more robust code logic rasterize small labels; update artifacts
1 parent e25a1ea commit a9b8c10

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/spatialdata_plot/pl/render.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,10 @@ def _render_labels(
10321032
color_vector = color_vector[mask]
10331033
if isinstance(color_vector.dtype, pd.CategoricalDtype):
10341034
color_vector = color_vector.remove_unused_categories()
1035-
if color_source_vector is not None:
1035+
assert color_source_vector is not None
10361036
color_source_vector = color_source_vector[mask]
1037+
else:
1038+
assert color_source_vector is None
10371039

10381040
def _draw_labels(seg_erosionpx: int | None, seg_boundaries: bool, alpha: float) -> matplotlib.image.AxesImage:
10391041
labels = _map_color_seg(
Loading
Loading

0 commit comments

Comments
 (0)