Skip to content

Commit 33068ca

Browse files
timtreisclaude
andcommitted
Fix points groups filtering: also filter adata, add baseline images
- Filter adata alongside points/color_vector so matplotlib scatter gets matching x/y and c array lengths - Add baseline reference images for groups+na_color=None tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5390fbb commit 33068ca

3 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/spatialdata_plot/pl/render.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,9 @@ def _render_points(
853853
if not hasattr(color_vector, "reset_index")
854854
else (color_vector[keep].reset_index(drop=True))
855855
)
856-
# filter the materialized points and re-register in sdata_filt
856+
# filter the materialized points, adata, and re-register in sdata_filt
857857
points = points[keep].reset_index(drop=True)
858+
adata = adata[keep].copy()
858859
points_dd = dask.dataframe.from_pandas(points, npartitions=1)
859860
sdata_filt.points[element] = PointsModel.parse(points_dd, coordinates={"x": "x", "y": "y"})
860861
set_transformation(
20.2 KB
Loading
12.8 KB
Loading

0 commit comments

Comments
 (0)