We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
xyz
xyz_colors
1 parent a360aa3 commit 1bd4b78Copy full SHA for 1bd4b78
src/spatialdata_plot/pl/utils.py
@@ -871,7 +871,7 @@ def _generate_base_categorial_color_mapping(
871
color_source_vector: ArrayLike | pd.Series[CategoricalDtype],
872
na_color: ColorLike,
873
) -> Mapping[str, str]:
874
- if adata is not None and cluster_key in adata.uns:
+ if adata is not None and cluster_key in adata.uns and f"{cluster_key}_colors" in adata.uns:
875
colors = adata.uns[f"{cluster_key}_colors"]
876
categories = color_source_vector.categories.tolist() + ["NaN"]
877
if "#" not in na_color:
0 commit comments