Make legend in bold with triplot

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Dournac Fabien
Posts: 74
Joined: May 18 2019
Affiliation: IRAP
Contact:

Make legend in bold with triplot

Post by Dournac Fabien » September 14 2020

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 ?

Post Reply