Sns Heatmap save as png jpeg image with full labels visible via python I am trying to save my heat map in png format using the below code, but the labels are getting trimmed when I am saving the heatmap. Please help to keep the labels inside the figure. 


    array = confusion_matrix(gts, preds, labels=class_name)
    #print(gts)
    #print(preds)
    df_cm = pd.DataFrame(array, index = class_name, columns = class_name)
    print("Confusion Matrix")
    print(df_cm)
    plt.figure(figsize = (10,7))

    sns_plot = sns.heatmap(df_cm, annot=True, cmap =sns.cm.rocket_r,linecolor='white', linewidths=1)

    results_path = 'results.png'
    #print(results_path)
    plt.savefig(results_path, dpi=400)
results_path = 'results.png'`
#print(results_path)`
plt.savefig(results_path)`