-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Description
- Fedora 20; Python 2.7.5; Matplotlib 1.4.3 (installed by yum/pip)
For some reason, I can render Latex fonts including Greek ones in my axis labels but when I try to do it with my legends in the same figure, I cannot.
Enforcing explicitly Latex as described here won't solve the issue.
In my code:
fig,ax = plt.suplot(111)
ax.plot(x,y)
ax.set_ylabel(r'$\xi$ etc.') # Rendered correctly
# Add Legend
labels_legend = {'js' : '$W_S,U_A$',
'xi' : r'$\xi$',
'taup' : r'$\tau_p$'
}
obj_legend = []
colors = {'js' : 'k',
'xi' : 'r',
'taup' : 'y'
}
for k,lbl in labels_legend.iteritems():
# Add artist for legend
obj_legend.append(ax.plot([],[],color=colors[k], marker=" ", ls='-', lw=lw, label=labels_legend[k])[0])
# Add Legend (NOT RENDERED CORRECTLY!!!)
legend = ax.legend(obj_legend,labels_legend,numpoints=1,fontsize=legfs,frameon=True,loc=1)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels