Hi all,
If I run the attached example I get
python -i test_polar.py --verbose-helpful
$HOME=/home/nwagner
matplotlib data path
/usr/lib/python2.4/site-packages/matplotlib/mpl-data
loaded rc file /home/nwagner/matplotlibrc
matplotlib version 0.98.3
verbose.level helpful
interactive is False
units is False
platform is linux2
CONFIGDIR=/home/nwagner/.matplotlib
Using fontManager instance from
/home/nwagner/.matplotlib/fontList.cache
backend WXAgg version 2.5.3.1
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
to Bitstream Vera Sans
(/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
with score of 1.000000
Found dvipng version 1.5
You are using unicode and latex, but have not enabled the
matplotlib 'text.latex.unicode' rcParam.
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py",
line 1121, in _onPaint
self.draw(drawDC=drawDC)
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
line 60, in draw
FigureCanvasAgg.draw(self)
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 283, in draw
self.figure.draw(self.renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/figure.py",
line 767, in draw
for a in self.axes: a.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/axes.py",
line 1591, in draw
a.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/axis.py",
line 710, in draw
tick.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/axis.py",
line 193, in draw
self.label1.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/text.py",
line 448, in draw
bbox, info = self._get_layout(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/text.py",
line 251, in _get_layout
w, h, d = renderer.get_text_width_height_descent(
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 150, in get_text_width_height_descent
Z = texmanager.get_grey(s, size, self.dpi)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 383, in get_grey
pngfile = self.make_png(tex, fontsize, dpi)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 312, in make_png
dvifile = self.make_dvi(tex, fontsize)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 275, in make_dvi
texfile = self.make_tex(tex, fontsize)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 254, in make_tex
fh.write(s)
UnicodeEncodeError: 'ascii' codec can't encode character
u'\xb0' in position 300: ordinal not in range(128)
You are using unicode and latex, but have not enabled the
matplotlib 'text.latex.unicode' rcParam.
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py",
line 1121, in _onPaint
self.draw(drawDC=drawDC)
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
line 60, in draw
FigureCanvasAgg.draw(self)
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 283, in draw
self.figure.draw(self.renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/figure.py",
line 767, in draw
for a in self.axes: a.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/axes.py",
line 1591, in draw
a.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/axis.py",
line 710, in draw
tick.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/axis.py",
line 193, in draw
self.label1.draw(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/text.py",
line 448, in draw
bbox, info = self._get_layout(renderer)
File
"/usr/lib/python2.4/site-packages/matplotlib/text.py",
line 251, in _get_layout
w, h, d = renderer.get_text_width_height_descent(
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 150, in get_text_width_height_descent
Z = texmanager.get_grey(s, size, self.dpi)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 383, in get_grey
pngfile = self.make_png(tex, fontsize, dpi)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 312, in make_png
dvifile = self.make_dvi(tex, fontsize)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 275, in make_dvi
texfile = self.make_tex(tex, fontsize)
File
"/usr/lib/python2.4/site-packages/matplotlib/texmanager.py",
line 254, in make_tex
fh.write(s)
UnicodeEncodeError: 'ascii' codec can't encode character
u'\xb0' in position 300: ordinal not in range(128)
Any idea ?
Nils
from pylab import linspace, polar, xticks, yticks, show, savefig
from numpy.random import rand
from numpy import ones, exp, pi
theta = linspace(0.,2*pi,25)
r = 10.*ones(25)
noise = 0.01*(2.*rand(25)-ones(25))
polar(theta,r+noise)
show()
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users