python matplotlib increase bar label font size

11,748

Well, I got the answer. You can change the fontsize using ax.legend:

ax.legend(loc='best', fontsize=25)

Hope it helps anybody else with the same problem!

Share:
11,748

Related videos on Youtube

mj1261829
Author by

mj1261829

Updated on May 25, 2022

Comments

  • mj1261829
    mj1261829 about 2 years

    I have a subplot which may include different stacked bar charts. I want to increase the font size of the bar label as it is appearing small. for ex. in

    ax.bar(adjlocs, ...
     label='...', ...)
    

    I want the font size of what is set to label to be larger. I did find ways to increase the text size of others in the plot except this one. How to achieve this? Thanks

  • littleO
    littleO about 2 years
    A full working example would be helpful.