Skip to content

Commit 0a0a81d

Browse files
committed
small fix
1 parent ee3b56d commit 0a0a81d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/spatialdata_plot/pl/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -929,9 +929,9 @@ def _get_categorical_color_mapping(
929929
if isinstance(groups, str):
930930
groups = [groups]
931931

932-
if not palette and render_type == "points":
933-
if cmap_params is not None and not cmap_params.cmap_is_default:
934-
palette = cmap_params.cmap
932+
if not palette and render_type == "points" and cmap_params is not None and not cmap_params.cmap_is_default:
933+
palette = cmap_params.cmap
934+
935935
color_idx = color_idx = np.linspace(0, 1, len(color_source_vector.categories))
936936
if isinstance(palette, ListedColormap):
937937
palette = [to_hex(x) for x in palette(color_idx, alpha=alpha)]

0 commit comments

Comments
 (0)