[Python] First and last row cut in half of heatmap plot

Discussão em 'Python' iniciado por Stack, Setembro 2, 2025.

  1. Stack

    Stack Membro Participativo

    When plotting heatmaps with seaborn (and correlation matrices with matplotlib) the first and the last row is cut in halve. This happens also when I run this minimal code example which I found online.

    import pandas as pd
    import seaborn as sns
    import matplotlib.pyplot as plt

    data = pd.read_csv('https://raw.githubusercontent.com/resbaz/r-novice-gapminder-files/master/data/gapminder-FiveYearData.csv')
    plt.figure(figsize=(10,5))
    sns.heatmap(data.corr())
    plt.show()


    [​IMG] The labels at the y axis are on the correct spot, but the rows aren't completely there.

    A few days ago, it work as intended. Since then, I installed texlive-xetex so I removed it again but it didn't solve my problem.

    Any ideas what I could be missing?

    Continue reading...

Compartilhe esta Página