-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colors categorical column in table annotated by a labels layer not correct in napari-spatialdata #328
Comments
so here the colors are not stored in the SpatialData object so there is also no way to have this then show in napari-spatialdata. We would have to double check with storing the colors that we then have the way of making this work. If not this could be a task for the hackathon in Basel next week. |
Hi @melonora in this example, the colors of "new_category" are stored in
So in a way, napari-spatialdata could look for "new_category_colors" in .uns. And if not found, fall back to some default cmap. Note that the 'correct' colors are visible in the scatter widget (because in the background they are probably generated by the same call to |
Thanks @ArneDefauw for reporting. This is now fixed in #337. Please notice that there is no need to pass Still, unfortunately (unrelated PR), now the color shown by the scatterplot widget is wrong. I will track this in a new issue. |
Thank @LucaMarconato for the fix. Everything sems to work fine now on the dummy blobs dataset. However, if I try the solution on another dataset, with the same dummy categorical column, it fails. It tried to reproduce the issue it on the dummy blobs dataset, but I did not succeed. I used this code:
When I try to visualize "new_category" in napari-spatialdata I get the error: Traceback (most recent call last): |
I provide some code to reproduce the issue:
Gives me the umap:
spatialdata-plot
correctly plots the column "new_category":But when I do
I get:
The large cell in the bottom is visualized as having "new_category" '6' with
napari-spatialdata
, whilespatialdata_plot
, correctly plots it as having "new_category" '7'.I am using the latest version of
napari-spatialdata
( 0.5.3 ), and I am using macOS (I do not know if this is relevant, but given #273, it may be).The text was updated successfully, but these errors were encountered: