Hello,
in case someone has the same problem as me -- to display accented
letters in matplotlib -- this is how to do it:
#! /usr/bin/python
# -*- coding: iso-8859-2; -*-
import matplotlib
matplotlib.use('GTK')
from pylab import *
plot([1,2,3])
title(u'some accented letters: =C4=9B=C5=A1=C4=8D=C5=99=C5=BE=C3=BD=C3=A1=
=C3=A1=C3=AD=C3=A9')
#savefig("pokus.eps")
show()
Important is "use('GTK')" (Agg backend only shows rectangles instead of
accented letters) and "title(u'some..." (the "u" -- without it it
doesn't work either).
You can save the figure to *.png, unfortunately saving to *.eps or *.ps
doesn't work (even using different backend).
Ondrej Certik
|