Skip to content

Commit 9313a40

Browse files
committed
renamed var
1 parent 96ef58d commit 9313a40

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/spatialdata_plot/pl/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,7 @@ def _validate_image_render_params(
20782078
if isinstance(palette, list):
20792079
# case A: single palette for all channels
20802080
if len(palette) == 1:
2081-
palette_length = len(channel_list) if channel_list is not None else len(spatial_element_ch)
2081+
palette_length = len(channel) if channel is not None else len(spatial_element_ch)
20822082
palette = palette * palette_length
20832083
# case B: one palette per channel (either given or derived from channel length)
20842084
channels_to_use = spatial_element_ch if element_params[el]["channel"] is None else channel
@@ -2092,9 +2092,9 @@ def _validate_image_render_params(
20922092

20932093
if (cmap := param_dict["cmap"]) is not None:
20942094
if len(cmap) == 1:
2095-
cmap_length = len(channel_list) if channel_list is not None else len(spatial_element_ch)
2095+
cmap_length = len(channel) if channel is not None else len(spatial_element_ch)
20962096
cmap = cmap * cmap_length
2097-
if (channel_list is not None and len(cmap) != len(channel_list)) or len(cmap) != len(spatial_element_ch):
2097+
if (channel is not None and len(cmap) != len(channel)) or len(cmap) != len(spatial_element_ch):
20982098
cmap = None
20992099
element_params[el]["cmap"] = cmap
21002100
element_params[el]["norm"] = param_dict["norm"]

0 commit comments

Comments
 (0)