Page 1 of 1

Make legend in bold with triplot

Posted: September 14 2020
by Dournac Fabien
Hello,

I am trying to make bold text inside legend of a triplot.

I did tests with :

1)

Code: Select all

import matplotlib.font_manager as font_manager
# Font for legend
font = font_manager.FontProperties(family= 'Comic Sans MS',  # 'Times new roman',
                                   weight='bold',
                                   style='normal', size=25)

g.add_legend(['sample1', sample2', prop = font])
2)

Code: Select all

g.add_legend(['\033[1m' + 'sample1' + ' \033[0m', '\033[1m' + 'sample2' + ' \033[0m'])
But both don't work...

Has anyone got an idea ?