Closed LucaMarconato closed 8 months ago
Line https://github.com/scverse/spatialdata-plot/blob/c1cc849eb8821d42326e34595dc7780f9186824f/src/spatialdata_plot/pl/render.py#L276 and onwards 👍 Essentially we add the artists and then apply the transformations. So I doubt you can easily transfer it to Napari :/
Thanks @timtreis. Actually I realized that in the spatialdata
branch, where I didn't have this bug, napari
was automatically adjusting the radius. In that branch I was using ellipses instead of points, so I think this is probably a bug of napari that could be fixed upstream.
Reported here: https://github.com/napari/napari/issues/6649
Somehow the bug is still present, I will check this again after we merge the multi_table
branch with https://github.com/scverse/napari-spatialdata/pull/199.
The bug was reintroduced with the multi_table PR, now it's fixed again, but the radius actually turns out to be incorrect, I will track this in another issue: https://github.com/scverse/napari-spatialdata/issues/209.
The behavior appears for instance with this dataset: https://github.com/giovp/spatialdata-sandbox/blob/main/visium/to_zarr.py.
A fix would be to use the same logic as here: https://github.com/scverse/spatialdata/blob/0446efff1ea8e5f31e5d901d83cf5eb38a72cc4d/src/spatialdata/_core/operations/transform.py#L364. If convenient, we can put this code in a helper function to avoid code duplication.
@timtreis @Sonja-Stockhaus can you please point me to the code used by
spatialdata-plot
to handle this case?