-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
Description
When attempting to render_shapes with a color key or a table key that does not exist, spatialdata-plot just plots everything grey. I would expect it to raise a KeyError instead.
Example
# example dataset from tutorial
sdata = sd.read_zarr("visium_brain.zarr/")
(
sdata.pl.render_images(elements="ST8059050_hires_image")
.pl.render_shapes(elements="ST8059050", color="doesntexist")
.pl.show()
)(
sdata.pl.render_images(elements="ST8059050_hires_image")
.pl.render_shapes(elements="ST8059050", color="mt-Co3", table_name="doesntexist")
.pl.show()
)Also, somewhat related, the function silently accepts any keyword argument.
For instance, if I mistype table instead of table_name it just uses the default table instead of failing, which can be confusing.
EDIT: again, somewhat related, I'd also expect a failure with corresponding error message that tells me if a region could not be found in the table.

