You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spatialdata-plot correctly plots the column "new_category":
But when I do
from napari_spatialdata import Interactive
Interactive( sdata )
I get:
The large cell in the bottom is visualized as having "new_category" '6' with napari-spatialdata, while spatialdata_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:
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.
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 sdata["table"].uns[ "new_category_colors" ], as they are added there through:
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 sc.pl.umap - I have not checked the code). So after running the scatter widget, you run into a discripancy between colors visualized there in the umap, and the colors of the annotated labels layer, which could confuse users.
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: