napari-clusters-plotter
napari-clusters-plotter copied to clipboard
Labels layer opacity = 0
In napari-clusters-plotter 0.7.0 the labels layer's opacity
is set to 0 at some point. It appears empty and a new user might be confused. Instead of setting its opacity, I would vote for hiding it (layer.visible=False
). The user can then easily get it back.
I can't recall what was exactly the issue but this change was made in the implementation of 2D histogram PR due to some bug that was appearing if labels layer is made invisible -> Originally posted by @thorstenwagner in https://github.com/BiAPoL/napari-clusters-plotter/pull/196#issuecomment-1466165021
So, as soon as a layer is invisible, it is not in sync with the visible layer slices anymore. I think the world_to_data function gets confused and returns a wrong position (z-coordinate is wrong). That was a problem for one of my plugins interacting with the cluster-plotter-plugin. However, I added some changes to make sure that the label layer is visible:
https://github.com/MPI-Dortmund/napari-tomotwin/blob/main/src/napari_tomotwin/load_umap.py#L58
That said I think you can make your proposed change :-)