scatter_dot_colors_scaled
- ssapy.plotUtils.scatter_dot_colors_scaled(num_colors)[source][source]
Generates a scaled array of colors using the rainbow colormap.
This function creates a list of colors evenly spaced across the rainbow colormap. The number of colors generated is determined by the num_colors parameter.
- Parameters:
num_colors (int) – The number of colors to generate.
- Returns:
An array of RGBA color values, where each entry corresponds to a color in the rainbow colormap.
- Return type:
Example
>>> scatter_dot_colors_scaled(5) array([[1. , 0. , 0. , 1. ], [0.75 , 0.75 , 0. , 1. ], [0. , 1. , 0. , 1. ], [0. , 0.75 , 0.75 , 1. ], [0. , 0. , 1. , 1. ]])