Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to increase the font size of the x and y axis for a heat map

How to increase the font size of the x and y axes for a heat map?

# Correlation between different variables
   corr = data_set.corr()
#
# Set up the matplotlib plot configuration
#
f, ax = plt.subplots(figsize=(40, 20))
#
# Configure a custom diverging colormap
#
cmap = sns.diverging_palette(230, 20, as_cmap=True)
#
# Draw the heatmap
    sns.heatmap(corr, annot=True, cmap=cmap)
     ax.set_title('Correlation Heat Map', weight='bold', fontsize = 25)
sns.set(font_scale=3)
plt.show()

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

ax.set_xticklabels(ax.get_xticklabels(), fontsize=20)
ax.set_yticklabels(ax.get_yticklabels(), fontsize=20)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading