INNER CODE UNIT · Python

num

stefmolin/Hands-On-Data-Analysis-with-Pandas-2nd-edition · ch_06/color_utils.py:86

                num=segment_size + offset
            ))

        rgbas[:,i] = np.concatenate(updates)

    return ListedColormap(rgbas)


def draw_cmap(cmap, values=np.array([[0, 1]]), **kwargs):
    """
    Draw a colorbar for visualizing a colormap.

    Parameters:
        - cmap: A matplotlib colormap
        - values: The values to use for the colormap, defaults to [0, 1]
        - kwargs: Keyword arguments to pass to `plt.colorbar()`

    Returns:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…