[Python] Add edges to colorbar in seaborn heatmap

Discussão em 'Python' iniciado por Stack, Fevereiro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I have the following heatmap:

    import seaborn as sns
    import matplotlib.pyplot as plt
    import numpy as np

    # Create a sample heatmap
    data = np.random.rand(10, 12)
    ax = sns.heatmap(data)


    plt.show()


    How can I add a black edge to the colormap? Is there any way to do this without needing to use subplots?

    Continue reading...

Compartilhe esta Página