Thanks,
label=r'$\bf{label1}$'
worked.

Regards,
Eli


On Tue, Apr 5, 2011 at 10:14 PM, Darren Dale <dsdal...@gmail.com> wrote:

> On Tue, Apr 5, 2011 at 2:51 PM, Eli Brosh <ebro...@gmail.com> wrote:
> > Hello,
> >
> > I am using pylab with the rc parameter
> > rcParams['text.usetex']=True
> >
> > Now, I would like to make a legend with bold fonts.
> > So, I tried two options:
> >
> > 1)
> > from matplotlib.font_manager import fontManager, FontProperties
> > font= FontProperties(weight='bold',size=26)
> > plot([1,2,3],[1,2,3],'k',label='label1')
> > legend(loc='lower left', prop=font)
> >
> >
> > 2) After the legend(loc='lower left', prop=font) statement, I put:
> > legend1=gca().get_legend()
> > ltext = legend1.get_texts() # all the text.Text instance in the legend
> > setp(ltext, fontweight='bold') # the legend text fontsize
> >
> >
> >
> > Neither of these options changed the legend font weight to bold.
> > How can this be done?
> > How to change the legend font weight when rcParams['text.usetex']=True ?
>
> I think you may have to do something like "label=r'\textbf{label1}'".
>
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to