_mcolumn = ":::%s_mapping:::" % aes_name
values = data[color_col].tolist()
values = [(i - min(values)) / (max(values) - min(values)) for i in values]
color_mapping = gg.colormap(values)[::, :3]
data[_mcolumn] = [rgb2hex(value) for value in color_mapping]
key_colors = gg.colormap(indices)[::, :3]
key_colors = [rgb2hex(value) for value in key_colors]
After Change
Documented in `components.legend`
_mcolumn = ":::%s_mapping:::" % aes_name
min_val = data[color_col].min()
max_val = data[color_col].min()
values = (data[color_col] - min_val) / (max_val - min_val)values = values.tolist()
color_mapping = gg.colormap(values)[::, :3]
data[_mcolumn] = [rgb2hex(value) for value in color_mapping]
key_colors = gg.colormap(indices)[::, :3]
key_colors = [rgb2hex(value) for value in key_colors]