[Python] Hide Axis Titles in Seaborn

Discussão em 'Python' iniciado por Stack, Abril 12, 2025.

  1. Stack

    Stack Membro Participativo

    Given the following heatmap, how would I remove the axis titles ('month' and 'year')?

    import seaborn as sns

    # Load the example flights dataset and conver to long-form
    flights_long = sns.load_dataset("flights")
    flights = flights_long.pivot("month", "year", "passengers")

    # Draw a heatmap with the numeric values in each cell
    sns.heatmap(flights, annot=True, fmt="d", linewidths=.5)


    [​IMG]

    Continue reading...

Compartilhe esta Página