Skip to content

Commit efd7487

Browse files
author
Sonja Stockhaus
committed
fix index bug after spatial query
1 parent 88f6928 commit efd7487

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/spatialdata_plot/pl/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ def _get_collection_shape(
223223
# remove empty points/polygons
224224
shapes_df = shapes_df[shapes_df["geometry"].apply(lambda geom: not geom.is_empty)]
225225

226+
# reset index of shapes_df for case of spatial query
227+
shapes_df = shapes_df.reset_index()
228+
226229
rows = []
227230

228231
def assign_fill_and_outline_to_row(

0 commit comments

Comments
 (0)