In python3 / matplotlib, I'd like a plot with a label:
plt.plot(np.sin(np.linspace(1,10)), label='fête')
plt.legend(loc='upper left')
plt.show()
Works great. Now let's try with xkcd mode:
plt.xkcd()
plt.plot(np.sin(np.linspace(1,10)), label='fête')
plt.legend(loc='upper left')
plt.show()
No error, but the label is 'f?te'. It seems likely that this is a font problem rather than a matplotlib problem, based on reaction to this question on stackoverflow.
That said, I tried writing the word 'fête' in libreoffice with font humor sans, and no UTF-8'ish problems apparent (i.e., accents display correctly).
0 Answers