Does anyone know a way to get matplotlib to render accented chars (é,ã,â,etc)?
For instance i'm trying to use accented chars on set_yticklabels() and matplot renders squares instead, and when i use unicode() it renders the wrong chars.
Is there a way to make this work?
Thanks in advance, Jim.
Update
Turns out you can use u"éã" but first you have to set the file encoding
# Using the magic encoding
# -*- coding: utf-8 -*-
after that matplotlib correctly renders
u"é"
I also learned that you can use :
import matplotlib.font_manager as fm
fp1=fm.FontProperties(fname="/path/to/somefont.ttf")
ax.title("é",fontproperties=fp1)
in case you need to render a char that matplotlib does not have.