You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(38) |
2
(31) |
3
(9) |
|
4
(13) |
5
(24) |
6
(11) |
7
(8) |
8
(14) |
9
(7) |
10
(4) |
|
11
(7) |
12
(11) |
13
(16) |
14
(19) |
15
(11) |
16
(9) |
17
(3) |
|
18
(4) |
19
(47) |
20
(28) |
21
(9) |
22
(9) |
23
(11) |
24
|
|
25
|
26
(12) |
27
(22) |
28
(20) |
29
(16) |
30
(19) |
|
|
From: Jae-Joon L. <lee...@gm...> - 2010-04-19 17:47:05
|
I'm not sure if the default formatter needs to be changed. However, you may try import matplotlib.ticker as ticker formatter=ticker.LogFormatterMathtext() colorbar(format=formatter) which will render colorbar ticklabels with mathtext mode. Regards, -JJ On Fri, Apr 16, 2010 at 3:56 AM, Yves Revaz <yve...@ep...> wrote: > Dear list, > > I want to plot colored points using scatter, with the > color of points corresponding to the log of the z value of the points. > > the corresponding scatter command is : > > scatter(x,y,c=z,norm=colors.LogNorm()) > > unfortunately, then I then draw a colorbar simply calling > > colorbar() > > the fonts used for the color bar is no longer in latex mode, > as it was if I use a lin scale in scatter(), i.e., norm=None. > > > Is it a bug ? > > Any solution ? > > Thanks, > > yves > > > > > -- > (o o) > --------------------------------------------oOO--(_)--OOo------- > Dr. Yves Revaz > Laboratory of Astrophysics EPFL > Observatoire de Sauverny Tel : ++ 41 22 379 24 28 > 51. Ch. des Maillettes Fax : ++ 41 22 379 22 05 > 1290 Sauverny e-mail : Yve...@ep... > SWITZERLAND Web : http://www.lunix.ch/revaz/ > ---------------------------------------------------------------- > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Michael D. <md...@st...> - 2010-04-19 17:45:55
|
On Debian/Ubuntu-like systems with apt-get, you can get all of the development headers required for matplotlib in one fell swoop with: sudo apt-get build-dep python-matplotlib Mike Mauro Cavalcanti wrote: > As I posted before, I ran across precisely these same errors when > upgrading my Ubuntu box and the Python interpreter. You will need to > install other dependencies as the installation log shows (gtk-2.0+, > pygtk), including its development versions. > > And yes, distributing a packaged Python application which uses > Matplotlib (either for Linux or Windows) is *not* an easy and simple > matter. But with patience, it is possible. > > Best wishes, > > > 2010/4/19 C M <cmp...@gm...>: > >> ---------- Forwarded message ---------- >> From: C M <cmp...@gm...> >> Date: Mon, Apr 19, 2010 at 1:02 PM >> Subject: Re: [Matplotlib-users] install from svn on Linux not working for me >> To: Darren Dale <dsd...@gm...> >> >> >> On Mon, Apr 19, 2010 at 8:02 AM, Darren Dale <dsd...@gm...> wrote: >> >>> On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim <luk...@gm...> wrote: >>> >>>> On 04/19/2010 01:52 PM, C M wrote: >>>> >>>>> My goal is to just get the lastest svn version of matplotlib, or, if >>>>> not that, just the 0.99 version, up and working on my Linux (Intrepid >>>>> Ibex) computer. I checked it matplotlib out from svn fine, and then, >>>>> as per the webpage, did: >>>>> >>>>> >>>>>> cd matplotlib >>>>>> python setup.py install >>>>>> >>>>> and that resulted in a very large amount of errors. I'll post them at >>>>> the bottom of this message, since there are many lines. >>>>> >>>>> I previously had 0.98.x installed, via the Ubuntu repositories, but I >>>>> have uninstalled it. My version is: >>>>> Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 >>>>> x86_64 GNU/Linux >>>>> >>>>> Any help is appreciated. Thank you, >>>>> Che >>>>> >>>>> Errors (starting from a few lines before): >>>>> >>>>> creating build/temp.linux-x86_64-2.5/src >>>>> creating build/temp.linux-x86_64-2.5/CXX >>>>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >>>>> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >>>>> -DPYCXX_ISO_CPP_LIB=1 >>>>> -I/usr/lib/python2.5/site-packages/numpy/core/include >>>>> -I/usr/local/include -I/usr/include -I. >>>>> -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 >>>>> -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 >>>>> -I/usr/include/python2.5 -c src/ft2font.cpp -o >>>>> build/temp.linux-x86_64-2.5/src/ft2font.o >>>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >>>>> for Ada/C/ObjC but not for C++ >>>>> In file included from ./CXX/Extensions.hxx:37, >>>>> from src/ft2font.h:4, >>>>> from src/ft2font.cpp:1: >>>>> ./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory >>>>> >>>> You seem not to have the development package of python installed. >>>> Try "sudo apt-get install python-dev". >>>> >>> It looks like you are need to install libfreetype6-dev. Any time you >>> see missing .h files in your output, it means you need to install the >>> development headers for that package. >>> >>> Darren >>> >> Thanks, but after installing libfreetype6-dev, I tried to install >> matplotlib again and still get a lot of errors. Listed below. >> >> Che >> >> Ouput of install: >> >> basedirlist is: ['/usr/local', '/usr'] >> ============================================================================ >> BUILDING MATPLOTLIB >> matplotlib: 1.0.svn >> python: 2.5.2 (r252:60911, Jan 20 2010, 23:33:04) [GCC >> 4.3.2] >> platform: linux2 >> >> REQUIRED DEPENDENCIES >> numpy: 1.1.1 >> freetype2: 9.18.3 >> >> OPTIONAL BACKEND DEPENDENCIES >> libpng: found, but unknown version (no pkg-config) >> * Could not find 'libpng' headers in any of >> * '/usr/local/include', '/usr/include', '.' >> Tkinter: no >> * TKAgg requires Tkinter >> wxPython: 2.8.10.1 >> * WxAgg extension not required for wxPython >= 2.8 >> pkg-config: looking for pygtk-2.0 gtk+-2.0 >> * Package pygtk-2.0 was not found in the pkg-config >> * search path. Perhaps you should add the directory >> * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH >> * environment variable No package 'pygtk-2.0' found >> * Package gtk+-2.0 was not found in the pkg-config >> * search path. Perhaps you should add the directory >> * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH >> * environment variable No package 'gtk+-2.0' found >> * You may need to install 'dev' package(s) to >> * provide header files. >> Gtk+: no >> * Could not find Gtk+ headers in any of >> * '/usr/local/include', '/usr/include', '.' >> Mac OS X native: no >> Qt: no >> Qt4: no >> Cairo: 1.4.12 >> >> OPTIONAL DATE/TIMEZONE DEPENDENCIES >> datetime: present, version unknown >> dateutil: 1.4 >> pytz: 2008b >> >> OPTIONAL USETEX DEPENDENCIES >> dvipng: 1.11 >> ghostscript: 8.63 >> latex: 3.141592 >> pdftops: 3.00 >> >> [Edit setup.cfg to suppress the above messages] >> ============================================================================ >> pymods ['pylab'] >> packages ['matplotlib', 'matplotlib.backends', >> 'matplotlib.backends.qt4_editor', 'matplotlib.projections', >> 'matplotlib.testing', 'matplotlib.testing.jpl_units', >> 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', >> 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', >> 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', >> 'matplotlib.numerix', 'matplotlib.numerix.mlab', >> 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', >> 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', >> 'matplotlib.delaunay'] >> running install >> running build >> running build_py >> copying lib/matplotlib/mpl-data/matplotlibrc -> >> build/lib.linux-x86_64-2.5/matplotlib/mpl-data >> copying lib/matplotlib/mpl-data/matplotlib.conf -> >> build/lib.linux-x86_64-2.5/matplotlib/mpl-data >> running build_ext >> building 'matplotlib.ft2font' extension >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c src/ft2font.cpp -o >> build/temp.linux-x86_64-2.5/src/ft2font.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c src/mplutils.cpp -o >> build/temp.linux-x86_64-2.5/src/mplutils.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c CXX/cxxsupport.cxx -o >> build/temp.linux-x86_64-2.5/CXX/cxxsupport.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o >> build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c CXX/IndirectPythonInterface.cxx -o >> build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c CXX/cxxextensions.c -o >> build/temp.linux-x86_64-2.5/CXX/cxxextensions.o >> g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-x86_64-2.5/src/ft2font.o >> build/temp.linux-x86_64-2.5/src/mplutils.o >> build/temp.linux-x86_64-2.5/CXX/cxxsupport.o >> build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o >> build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o >> build/temp.linux-x86_64-2.5/CXX/cxxextensions.o -L/usr/local/lib >> -lfreetype -lz -lz -lstdc++ -lm -o >> build/lib.linux-x86_64-2.5/matplotlib/ft2font.so >> building 'matplotlib.ttconv' extension >> creating build/temp.linux-x86_64-2.5/ttconv >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c src/_ttconv.cpp -o >> build/temp.linux-x86_64-2.5/src/_ttconv.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c ttconv/pprdrv_tt.cpp -o >> build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c ttconv/pprdrv_tt2.cpp -o >> build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt2.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c ttconv/ttutil.cpp -o >> build/temp.linux-x86_64-2.5/ttconv/ttutil.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-x86_64-2.5/src/_ttconv.o >> build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt.o >> build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt2.o >> build/temp.linux-x86_64-2.5/ttconv/ttutil.o -L/usr/local/lib -o >> build/lib.linux-x86_64-2.5/matplotlib/ttconv.so >> building 'matplotlib._cntr' extension >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c >> src/cntr.c -o build/temp.linux-x86_64-2.5/src/cntr.o >> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-x86_64-2.5/src/cntr.o -L/usr/local/lib -o >> build/lib.linux-x86_64-2.5/matplotlib/_cntr.so >> building 'matplotlib._delaunay' extension >> creating build/temp.linux-x86_64-2.5/lib >> creating build/temp.linux-x86_64-2.5/lib/matplotlib >> creating build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c >> lib/matplotlib/delaunay/_delaunay.cpp -o >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/_delaunay.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* >> nn_interpolate_unstructured_method(PyObject*, PyObject*)’: >> lib/matplotlib/delaunay/_delaunay.cpp:469: warning: ‘intz’ may be used >> uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* >> nn_interpolate_method(PyObject*, PyObject*)’: >> lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘y’ may be used >> uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘z’ may be used >> uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘centers’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘nodes’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘neighbors’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* >> compute_planes_method(PyObject*, PyObject*)’: >> lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘nodes’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘z’ may be used >> uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘y’ may be used >> uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* >> linear_interpolate_method(PyObject*, PyObject*)’: >> lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘neighbors’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘nodes’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘y’ may be used >> uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘planes’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* >> getMesh(int, double*, double*)’: >> lib/matplotlib/delaunay/_delaunay.cpp:209: warning: ‘vertices’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:116: warning: ‘tri_nbrs’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp:116: warning: ‘tri_edges’ may be >> used uninitialized in this function >> lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* >> delaunay_method(PyObject*, PyObject*)’: >> lib/matplotlib/delaunay/_delaunay.cpp:667: warning: ‘y’ may be used >> uninitialized in this function >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c >> lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp -o >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/VoronoiDiagramGenerator.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp: In member >> function ‘bool VoronoiDiagramGenerator::voronoi(int)’: >> lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp:923: warning: >> ‘newintstar.Point::y’ may be used uninitialized in this function >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c >> lib/matplotlib/delaunay/delaunay_utils.cpp -o >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/delaunay_utils.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c >> lib/matplotlib/delaunay/natneighbors.cpp -o >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/natneighbors.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/_delaunay.o >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/VoronoiDiagramGenerator.o >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/delaunay_utils.o >> build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/natneighbors.o >> -L/usr/local/lib -o build/lib.linux-x86_64-2.5/matplotlib/_delaunay.so >> building 'matplotlib.nxutils' extension >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c >> src/nxutils.c -o build/temp.linux-x86_64-2.5/src/nxutils.o >> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-x86_64-2.5/src/nxutils.o -L/usr/local/lib -o >> build/lib.linux-x86_64-2.5/matplotlib/nxutils.so >> building 'matplotlib._path' extension >> creating build/temp.linux-x86_64-2.5/agg24 >> creating build/temp.linux-x86_64-2.5/agg24/src >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. -I/usr/include/python2.5 -c >> agg24/src/agg_curves.cpp -o >> build/temp.linux-x86_64-2.5/agg24/src/agg_curves.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. -I/usr/include/python2.5 -c >> agg24/src/agg_bezier_arc.cpp -o >> build/temp.linux-x86_64-2.5/agg24/src/agg_bezier_arc.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. -I/usr/include/python2.5 -c >> agg24/src/agg_trans_affine.cpp -o >> build/temp.linux-x86_64-2.5/agg24/src/agg_trans_affine.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. -I/usr/include/python2.5 -c >> agg24/src/agg_vcgen_stroke.cpp -o >> build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_stroke.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. -I/usr/include/python2.5 -c >> src/agg_py_transforms.cpp -o >> build/temp.linux-x86_64-2.5/src/agg_py_transforms.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. -I/usr/include/python2.5 -c src/path_cleanup.cpp >> -o build/temp.linux-x86_64-2.5/src/path_cleanup.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. -I/usr/include/python2.5 -c src/path.cpp -o >> build/temp.linux-x86_64-2.5/src/path.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> src/path.cpp: In function ‘void clip_to_rect(PathIterator&, double, >> double, double, double, bool, std::vector<std::vector<XY, >> std::allocator<XY> >, std::allocator<std::vector<XY, >> std::allocator<XY> > > >&)’: >> src/path.cpp:821: warning: ‘y’ may be used uninitialized in this function >> src/path.cpp:821: warning: ‘x’ may be used uninitialized in this function >> g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-x86_64-2.5/agg24/src/agg_curves.o >> build/temp.linux-x86_64-2.5/agg24/src/agg_bezier_arc.o >> build/temp.linux-x86_64-2.5/agg24/src/agg_trans_affine.o >> build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_stroke.o >> build/temp.linux-x86_64-2.5/CXX/cxxsupport.o >> build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o >> build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o >> build/temp.linux-x86_64-2.5/CXX/cxxextensions.o >> build/temp.linux-x86_64-2.5/src/agg_py_transforms.o >> build/temp.linux-x86_64-2.5/src/path_cleanup.o >> build/temp.linux-x86_64-2.5/src/path.o -L/usr/local/lib -lstdc++ -lm >> -o build/lib.linux-x86_64-2.5/matplotlib/_path.so >> building 'matplotlib.backends._backend_agg' extension >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c agg24/src/agg_vcgen_dash.cpp -o >> build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_dash.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c agg24/src/agg_image_filters.cpp -o >> build/temp.linux-x86_64-2.5/agg24/src/agg_image_filters.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc >> -Iagg24/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. >> -I/usr/include/python2.5 -c src/backend_agg.cpp -o >> build/temp.linux-x86_64-2.5/src/backend_agg.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> src/backend_agg.cpp:3:17: error: png.h: No such file or directory >> src/backend_agg.cpp: In member function ‘Py::Object >> RendererAgg::draw_image(const Py::Tuple&)’: >> src/backend_agg.cpp:824: warning: ‘h’ may be used uninitialized in this function >> src/backend_agg.cpp:824: warning: ‘w’ may be used uninitialized in this function >> error: command 'gcc' failed with exit status 1 >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: K.-Michael A. <kmi...@gm...> - 2010-04-19 17:35:22
|
On 2010-04-16 19:18:56 +0200, Keegan Callin said:
> Hello,
>
> I have written a small script that, I think, demonstrates a memory leak
> in savefig. A search of the mailing list shows a thread started by Ralf
> Gommers <ral...@go...> about
> 2009-07-01 that seems to
> cover a very similar issue. I have appended the demonstration script at
> the end of this e-mail text.
>
> [keegan@grizzly ~]$ python2.6
> Python 2.6.4 (r264:75706, Jan 20 2010, 12:34:05)
> [GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import matplotlib
> >>> matplotlib.__version__
> '0.99.1.1'
> '''
> # Import standard python modules
> import sys
> import os
> from ConfigParser import SafeConfigParser as ConfigParser
> from cStringIO import StringIO
>
> # import numpy
> import numpy
> from numpy import zeros
>
> # Import matplotlib
> from matplotlib.figure import Figure
> from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
>
>
> def build_figure(a):
> '''Returns a new figure containing array a.'''
>
> # Create figure and setup graph
> fig = Figure()
Could you try to use figure() instead of Figure()? That often creates a
mess on my side.
Or should one use Figure() in the 'Artist's style? I am still importing
pyplot as plt, and in that case, I have to use figure(), otherwise
things don't work.
I also had the feeling of a leak and am currently doing this without
much 'leaking': :)
fig = plt.figure()
ax = fig.add_subplot(111)
im = ax.imshow(nData)
cb = plt.colorbar(im)
ax.set_title(bname + ', ' + mode)
fig.savefig(filename + '.equal.png')
plt.close(fig)
I think, the plt.close(fig) was quite important in my case.
Give it a try!
Best regards,
Michael
|
|
From: Mauro C. <mau...@gm...> - 2010-04-19 17:32:03
|
As I posted before, I ran across precisely these same errors when upgrading my Ubuntu box and the Python interpreter. You will need to install other dependencies as the installation log shows (gtk-2.0+, pygtk), including its development versions. And yes, distributing a packaged Python application which uses Matplotlib (either for Linux or Windows) is *not* an easy and simple matter. But with patience, it is possible. Best wishes, 2010/4/19 C M <cmp...@gm...>: > ---------- Forwarded message ---------- > From: C M <cmp...@gm...> > Date: Mon, Apr 19, 2010 at 1:02 PM > Subject: Re: [Matplotlib-users] install from svn on Linux not working for me > To: Darren Dale <dsd...@gm...> > > > On Mon, Apr 19, 2010 at 8:02 AM, Darren Dale <dsd...@gm...> wrote: >> On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim <luk...@gm...> wrote: >>> On 04/19/2010 01:52 PM, C M wrote: >>>> My goal is to just get the lastest svn version of matplotlib, or, if >>>> not that, just the 0.99 version, up and working on my Linux (Intrepid >>>> Ibex) computer. I checked it matplotlib out from svn fine, and then, >>>> as per the webpage, did: >>>> >>>>> cd matplotlib >>>>> python setup.py install >>>> >>>> and that resulted in a very large amount of errors. I'll post them at >>>> the bottom of this message, since there are many lines. >>>> >>>> I previously had 0.98.x installed, via the Ubuntu repositories, but I >>>> have uninstalled it. My version is: >>>> Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 >>>> x86_64 GNU/Linux >>>> >>>> Any help is appreciated. Thank you, >>>> Che >>>> >>>> Errors (starting from a few lines before): >>>> >>>> creating build/temp.linux-x86_64-2.5/src >>>> creating build/temp.linux-x86_64-2.5/CXX >>>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >>>> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >>>> -DPYCXX_ISO_CPP_LIB=1 >>>> -I/usr/lib/python2.5/site-packages/numpy/core/include >>>> -I/usr/local/include -I/usr/include -I. >>>> -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 >>>> -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 >>>> -I/usr/include/python2.5 -c src/ft2font.cpp -o >>>> build/temp.linux-x86_64-2.5/src/ft2font.o >>>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >>>> for Ada/C/ObjC but not for C++ >>>> In file included from ./CXX/Extensions.hxx:37, >>>> from src/ft2font.h:4, >>>> from src/ft2font.cpp:1: >>>> ./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory >>> >>> You seem not to have the development package of python installed. >>> Try "sudo apt-get install python-dev". >> >> It looks like you are need to install libfreetype6-dev. Any time you >> see missing .h files in your output, it means you need to install the >> development headers for that package. >> >> Darren > > Thanks, but after installing libfreetype6-dev, I tried to install > matplotlib again and still get a lot of errors. Listed below. > > Che > > Ouput of install: > > basedirlist is: ['/usr/local', '/usr'] > ============================================================================ > BUILDING MATPLOTLIB > matplotlib: 1.0.svn > python: 2.5.2 (r252:60911, Jan 20 2010, 23:33:04) [GCC > 4.3.2] > platform: linux2 > > REQUIRED DEPENDENCIES > numpy: 1.1.1 > freetype2: 9.18.3 > > OPTIONAL BACKEND DEPENDENCIES > libpng: found, but unknown version (no pkg-config) > * Could not find 'libpng' headers in any of > * '/usr/local/include', '/usr/include', '.' > Tkinter: no > * TKAgg requires Tkinter > wxPython: 2.8.10.1 > * WxAgg extension not required for wxPython >= 2.8 > pkg-config: looking for pygtk-2.0 gtk+-2.0 > * Package pygtk-2.0 was not found in the pkg-config > * search path. Perhaps you should add the directory > * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH > * environment variable No package 'pygtk-2.0' found > * Package gtk+-2.0 was not found in the pkg-config > * search path. Perhaps you should add the directory > * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH > * environment variable No package 'gtk+-2.0' found > * You may need to install 'dev' package(s) to > * provide header files. > Gtk+: no > * Could not find Gtk+ headers in any of > * '/usr/local/include', '/usr/include', '.' > Mac OS X native: no > Qt: no > Qt4: no > Cairo: 1.4.12 > > OPTIONAL DATE/TIMEZONE DEPENDENCIES > datetime: present, version unknown > dateutil: 1.4 > pytz: 2008b > > OPTIONAL USETEX DEPENDENCIES > dvipng: 1.11 > ghostscript: 8.63 > latex: 3.141592 > pdftops: 3.00 > > [Edit setup.cfg to suppress the above messages] > ============================================================================ > pymods ['pylab'] > packages ['matplotlib', 'matplotlib.backends', > 'matplotlib.backends.qt4_editor', 'matplotlib.projections', > 'matplotlib.testing', 'matplotlib.testing.jpl_units', > 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', > 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', > 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', > 'matplotlib.numerix', 'matplotlib.numerix.mlab', > 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', > 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', > 'matplotlib.delaunay'] > running install > running build > running build_py > copying lib/matplotlib/mpl-data/matplotlibrc -> > build/lib.linux-x86_64-2.5/matplotlib/mpl-data > copying lib/matplotlib/mpl-data/matplotlib.conf -> > build/lib.linux-x86_64-2.5/matplotlib/mpl-data > running build_ext > building 'matplotlib.ft2font' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c src/ft2font.cpp -o > build/temp.linux-x86_64-2.5/src/ft2font.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c src/mplutils.cpp -o > build/temp.linux-x86_64-2.5/src/mplutils.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c CXX/cxxsupport.cxx -o > build/temp.linux-x86_64-2.5/CXX/cxxsupport.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o > build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c CXX/IndirectPythonInterface.cxx -o > build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c CXX/cxxextensions.c -o > build/temp.linux-x86_64-2.5/CXX/cxxextensions.o > g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.5/src/ft2font.o > build/temp.linux-x86_64-2.5/src/mplutils.o > build/temp.linux-x86_64-2.5/CXX/cxxsupport.o > build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o > build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o > build/temp.linux-x86_64-2.5/CXX/cxxextensions.o -L/usr/local/lib > -lfreetype -lz -lz -lstdc++ -lm -o > build/lib.linux-x86_64-2.5/matplotlib/ft2font.so > building 'matplotlib.ttconv' extension > creating build/temp.linux-x86_64-2.5/ttconv > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c src/_ttconv.cpp -o > build/temp.linux-x86_64-2.5/src/_ttconv.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c ttconv/pprdrv_tt.cpp -o > build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c ttconv/pprdrv_tt2.cpp -o > build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt2.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c ttconv/ttutil.cpp -o > build/temp.linux-x86_64-2.5/ttconv/ttutil.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.5/src/_ttconv.o > build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt.o > build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt2.o > build/temp.linux-x86_64-2.5/ttconv/ttutil.o -L/usr/local/lib -o > build/lib.linux-x86_64-2.5/matplotlib/ttconv.so > building 'matplotlib._cntr' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c > src/cntr.c -o build/temp.linux-x86_64-2.5/src/cntr.o > gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.5/src/cntr.o -L/usr/local/lib -o > build/lib.linux-x86_64-2.5/matplotlib/_cntr.so > building 'matplotlib._delaunay' extension > creating build/temp.linux-x86_64-2.5/lib > creating build/temp.linux-x86_64-2.5/lib/matplotlib > creating build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c > lib/matplotlib/delaunay/_delaunay.cpp -o > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/_delaunay.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* > nn_interpolate_unstructured_method(PyObject*, PyObject*)’: > lib/matplotlib/delaunay/_delaunay.cpp:469: warning: ‘intz’ may be used > uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* > nn_interpolate_method(PyObject*, PyObject*)’: > lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘y’ may be used > uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘z’ may be used > uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘centers’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘nodes’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘neighbors’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* > compute_planes_method(PyObject*, PyObject*)’: > lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘nodes’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘z’ may be used > uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘y’ may be used > uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* > linear_interpolate_method(PyObject*, PyObject*)’: > lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘neighbors’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘nodes’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘y’ may be used > uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘planes’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* > getMesh(int, double*, double*)’: > lib/matplotlib/delaunay/_delaunay.cpp:209: warning: ‘vertices’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:116: warning: ‘tri_nbrs’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp:116: warning: ‘tri_edges’ may be > used uninitialized in this function > lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* > delaunay_method(PyObject*, PyObject*)’: > lib/matplotlib/delaunay/_delaunay.cpp:667: warning: ‘y’ may be used > uninitialized in this function > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c > lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp -o > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/VoronoiDiagramGenerator.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp: In member > function ‘bool VoronoiDiagramGenerator::voronoi(int)’: > lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp:923: warning: > ‘newintstar.Point::y’ may be used uninitialized in this function > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c > lib/matplotlib/delaunay/delaunay_utils.cpp -o > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/delaunay_utils.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c > lib/matplotlib/delaunay/natneighbors.cpp -o > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/natneighbors.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/_delaunay.o > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/VoronoiDiagramGenerator.o > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/delaunay_utils.o > build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/natneighbors.o > -L/usr/local/lib -o build/lib.linux-x86_64-2.5/matplotlib/_delaunay.so > building 'matplotlib.nxutils' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c > src/nxutils.c -o build/temp.linux-x86_64-2.5/src/nxutils.o > gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.5/src/nxutils.o -L/usr/local/lib -o > build/lib.linux-x86_64-2.5/matplotlib/nxutils.so > building 'matplotlib._path' extension > creating build/temp.linux-x86_64-2.5/agg24 > creating build/temp.linux-x86_64-2.5/agg24/src > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. -I/usr/include/python2.5 -c > agg24/src/agg_curves.cpp -o > build/temp.linux-x86_64-2.5/agg24/src/agg_curves.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. -I/usr/include/python2.5 -c > agg24/src/agg_bezier_arc.cpp -o > build/temp.linux-x86_64-2.5/agg24/src/agg_bezier_arc.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. -I/usr/include/python2.5 -c > agg24/src/agg_trans_affine.cpp -o > build/temp.linux-x86_64-2.5/agg24/src/agg_trans_affine.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. -I/usr/include/python2.5 -c > agg24/src/agg_vcgen_stroke.cpp -o > build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_stroke.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. -I/usr/include/python2.5 -c > src/agg_py_transforms.cpp -o > build/temp.linux-x86_64-2.5/src/agg_py_transforms.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. -I/usr/include/python2.5 -c src/path_cleanup.cpp > -o build/temp.linux-x86_64-2.5/src/path_cleanup.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. -I/usr/include/python2.5 -c src/path.cpp -o > build/temp.linux-x86_64-2.5/src/path.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > src/path.cpp: In function ‘void clip_to_rect(PathIterator&, double, > double, double, double, bool, std::vector<std::vector<XY, > std::allocator<XY> >, std::allocator<std::vector<XY, > std::allocator<XY> > > >&)’: > src/path.cpp:821: warning: ‘y’ may be used uninitialized in this function > src/path.cpp:821: warning: ‘x’ may be used uninitialized in this function > g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.5/agg24/src/agg_curves.o > build/temp.linux-x86_64-2.5/agg24/src/agg_bezier_arc.o > build/temp.linux-x86_64-2.5/agg24/src/agg_trans_affine.o > build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_stroke.o > build/temp.linux-x86_64-2.5/CXX/cxxsupport.o > build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o > build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o > build/temp.linux-x86_64-2.5/CXX/cxxextensions.o > build/temp.linux-x86_64-2.5/src/agg_py_transforms.o > build/temp.linux-x86_64-2.5/src/path_cleanup.o > build/temp.linux-x86_64-2.5/src/path.o -L/usr/local/lib -lstdc++ -lm > -o build/lib.linux-x86_64-2.5/matplotlib/_path.so > building 'matplotlib.backends._backend_agg' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c agg24/src/agg_vcgen_dash.cpp -o > build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_dash.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c agg24/src/agg_image_filters.cpp -o > build/temp.linux-x86_64-2.5/agg24/src/agg_image_filters.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. > -I/usr/include/python2.5 -c src/backend_agg.cpp -o > build/temp.linux-x86_64-2.5/src/backend_agg.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > src/backend_agg.cpp:3:17: error: png.h: No such file or directory > src/backend_agg.cpp: In member function ‘Py::Object > RendererAgg::draw_image(const Py::Tuple&)’: > src/backend_agg.cpp:824: warning: ‘h’ may be used uninitialized in this function > src/backend_agg.cpp:824: warning: ‘w’ may be used uninitialized in this function > error: command 'gcc' failed with exit status 1 > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Dr. Mauro J. Cavalcanti P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: mau...@gm... Web: http://sites.google.com/site/maurobio Linux Registered User #473524 * Ubuntu User #22717 |
|
From: C M <cmp...@gm...> - 2010-04-19 17:03:53
|
---------- Forwarded message ---------- From: C M <cmp...@gm...> Date: Mon, Apr 19, 2010 at 12:58 PM Subject: Re: [Matplotlib-users] install from svn on Linux not working for me To: LUK ShunTim <luk...@gm...> On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim <luk...@gm...> wrote: > On 04/19/2010 01:52 PM, C M wrote: >> My goal is to just get the lastest svn version of matplotlib, or, if >> not that, just the 0.99 version, up and working on my Linux (Intrepid >> Ibex) computer. I checked it matplotlib out from svn fine, and then, >> as per the webpage, did: >> >>> cd matplotlib >>> python setup.py install >> >> and that resulted in a very large amount of errors. I'll post them at >> the bottom of this message, since there are many lines. >> >> I previously had 0.98.x installed, via the Ubuntu repositories, but I >> have uninstalled it. My version is: >> Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 >> x86_64 GNU/Linux >> >> Any help is appreciated. Thank you, >> Che >> >> Errors (starting from a few lines before): >> >> creating build/temp.linux-x86_64-2.5/src >> creating build/temp.linux-x86_64-2.5/CXX >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 >> -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 >> -I/usr/include/python2.5 -c src/ft2font.cpp -o >> build/temp.linux-x86_64-2.5/src/ft2font.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> In file included from ./CXX/Extensions.hxx:37, >> from src/ft2font.h:4, >> from src/ft2font.cpp:1: >> ./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory > > You seem not to have the development package of python installed. > Try "sudo apt-get install python-dev". > > Regards, > ST Well, I now did that and I still get lots of errors.... The full output of the terminal is listed below. Why is this so much more difficult than the website suggests? Am I going to need to take this all into account if I want to distribute a packaged-up version of my application on Linux? This is the first time I've run into these problems. Thanks, Che Terminal output: basedirlist is: ['/usr/local', '/usr'] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.0.svn python: 2.5.2 (r252:60911, Jan 20 2010, 23:33:04) [GCC 4.3.2] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.1.1 freetype2: found, but unknown version (no pkg-config) * WARNING: Could not find 'freetype2' headers in any * of '/usr/local/include', '/usr/include', '.', * '/usr/local/include/freetype2', * '/usr/include/freetype2', './freetype2'. OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of * '/usr/local/include', '/usr/include', '.' Tkinter: no * TKAgg requires Tkinter wxPython: 2.8.10.1 * WxAgg extension not required for wxPython >= 2.8 pkg-config: looking for pygtk-2.0 gtk+-2.0 * Package pygtk-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'pygtk-2.0' found * Package gtk+-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'gtk+-2.0' found * You may need to install 'dev' package(s) to * provide header files. Gtk+: no * Could not find Gtk+ headers in any of * '/usr/local/include', '/usr/include', '.' Mac OS X native: no Qt: no Qt4: no Cairo: 1.4.12 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: 1.4 pytz: 2008b OPTIONAL USETEX DEPENDENCIES dvipng: 1.11 ghostscript: 8.63 latex: 3.141592 pdftops: 3.00 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay'] running install running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-2.5/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-x86_64-2.5/matplotlib/mpl-data running build_ext building 'matplotlib.ft2font' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 -I/usr/include/python2.5 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.5/src/ft2font.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ In file included from src/ft2font.cpp:1: src/ft2font.h:13:22: error: ft2build.h: No such file or directory src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME> In file included from src/ft2font.cpp:1: src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared src/ft2font.h:31: error: ‘FT_Int’ has not been declared src/ft2font.h:31: error: ‘FT_Int’ has not been declared src/ft2font.h:77: error: expected ‘,’ or ‘...’ before ‘&’ token src/ft2font.h:77: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:83: error: expected ‘,’ or ‘...’ before ‘&’ token src/ft2font.h:83: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:124: error: ‘FT_Face’ does not name a type src/ft2font.h:125: error: ‘FT_Matrix’ does not name a type src/ft2font.h:126: error: ‘FT_Vector’ does not name a type src/ft2font.h:127: error: ‘FT_Error’ does not name a type src/ft2font.h:128: error: ‘FT_Glyph’ was not declared in this scope src/ft2font.h:128: error: template argument 1 is invalid src/ft2font.h:128: error: template argument 2 is invalid src/ft2font.h:129: error: ‘FT_Vector’ was not declared in this scope src/ft2font.h:129: error: template argument 1 is invalid src/ft2font.h:129: error: template argument 2 is invalid src/ft2font.h:135: error: ‘FT_BBox’ does not name a type src/ft2font.cpp:45: error: ‘FT_Library’ does not name a type src/ft2font.cpp:96: error: variable or field ‘draw_bitmap’ declared void src/ft2font.cpp:96: error: ‘FT_Bitmap’ was not declared in this scope src/ft2font.cpp:96: error: ‘bitmap’ was not declared in this scope src/ft2font.cpp:97: error: ‘FT_Int’ was not declared in this scope src/ft2font.cpp:98: error: ‘FT_Int’ was not declared in this scope /usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: warning: ‘int _import_array()’ defined but not used error: command 'gcc' failed with exit status 1 |
|
From: C M <cmp...@gm...> - 2010-04-19 17:03:20
|
---------- Forwarded message ---------- From: C M <cmp...@gm...> Date: Mon, Apr 19, 2010 at 1:02 PM Subject: Re: [Matplotlib-users] install from svn on Linux not working for me To: Darren Dale <dsd...@gm...> On Mon, Apr 19, 2010 at 8:02 AM, Darren Dale <dsd...@gm...> wrote: > On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim <luk...@gm...> wrote: >> On 04/19/2010 01:52 PM, C M wrote: >>> My goal is to just get the lastest svn version of matplotlib, or, if >>> not that, just the 0.99 version, up and working on my Linux (Intrepid >>> Ibex) computer. I checked it matplotlib out from svn fine, and then, >>> as per the webpage, did: >>> >>>> cd matplotlib >>>> python setup.py install >>> >>> and that resulted in a very large amount of errors. I'll post them at >>> the bottom of this message, since there are many lines. >>> >>> I previously had 0.98.x installed, via the Ubuntu repositories, but I >>> have uninstalled it. My version is: >>> Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 >>> x86_64 GNU/Linux >>> >>> Any help is appreciated. Thank you, >>> Che >>> >>> Errors (starting from a few lines before): >>> >>> creating build/temp.linux-x86_64-2.5/src >>> creating build/temp.linux-x86_64-2.5/CXX >>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >>> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >>> -DPYCXX_ISO_CPP_LIB=1 >>> -I/usr/lib/python2.5/site-packages/numpy/core/include >>> -I/usr/local/include -I/usr/include -I. >>> -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 >>> -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 >>> -I/usr/include/python2.5 -c src/ft2font.cpp -o >>> build/temp.linux-x86_64-2.5/src/ft2font.o >>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >>> for Ada/C/ObjC but not for C++ >>> In file included from ./CXX/Extensions.hxx:37, >>> from src/ft2font.h:4, >>> from src/ft2font.cpp:1: >>> ./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory >> >> You seem not to have the development package of python installed. >> Try "sudo apt-get install python-dev". > > It looks like you are need to install libfreetype6-dev. Any time you > see missing .h files in your output, it means you need to install the > development headers for that package. > > Darren Thanks, but after installing libfreetype6-dev, I tried to install matplotlib again and still get a lot of errors. Listed below. Che Ouput of install: basedirlist is: ['/usr/local', '/usr'] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.0.svn python: 2.5.2 (r252:60911, Jan 20 2010, 23:33:04) [GCC 4.3.2] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.1.1 freetype2: 9.18.3 OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of * '/usr/local/include', '/usr/include', '.' Tkinter: no * TKAgg requires Tkinter wxPython: 2.8.10.1 * WxAgg extension not required for wxPython >= 2.8 pkg-config: looking for pygtk-2.0 gtk+-2.0 * Package pygtk-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'pygtk-2.0' found * Package gtk+-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'gtk+-2.0' found * You may need to install 'dev' package(s) to * provide header files. Gtk+: no * Could not find Gtk+ headers in any of * '/usr/local/include', '/usr/include', '.' Mac OS X native: no Qt: no Qt4: no Cairo: 1.4.12 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: 1.4 pytz: 2008b OPTIONAL USETEX DEPENDENCIES dvipng: 1.11 ghostscript: 8.63 latex: 3.141592 pdftops: 3.00 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay'] running install running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-2.5/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-x86_64-2.5/matplotlib/mpl-data running build_ext building 'matplotlib.ft2font' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.5/src/ft2font.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c src/mplutils.cpp -o build/temp.linux-x86_64-2.5/src/mplutils.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c CXX/cxxsupport.cxx -o build/temp.linux-x86_64-2.5/CXX/cxxsupport.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c CXX/IndirectPythonInterface.cxx -o build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c CXX/cxxextensions.c -o build/temp.linux-x86_64-2.5/CXX/cxxextensions.o g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.5/src/ft2font.o build/temp.linux-x86_64-2.5/src/mplutils.o build/temp.linux-x86_64-2.5/CXX/cxxsupport.o build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o build/temp.linux-x86_64-2.5/CXX/cxxextensions.o -L/usr/local/lib -lfreetype -lz -lz -lstdc++ -lm -o build/lib.linux-x86_64-2.5/matplotlib/ft2font.so building 'matplotlib.ttconv' extension creating build/temp.linux-x86_64-2.5/ttconv gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c src/_ttconv.cpp -o build/temp.linux-x86_64-2.5/src/_ttconv.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c ttconv/pprdrv_tt.cpp -o build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c ttconv/pprdrv_tt2.cpp -o build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt2.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c ttconv/ttutil.cpp -o build/temp.linux-x86_64-2.5/ttconv/ttutil.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.5/src/_ttconv.o build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt.o build/temp.linux-x86_64-2.5/ttconv/pprdrv_tt2.o build/temp.linux-x86_64-2.5/ttconv/ttutil.o -L/usr/local/lib -o build/lib.linux-x86_64-2.5/matplotlib/ttconv.so building 'matplotlib._cntr' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c src/cntr.c -o build/temp.linux-x86_64-2.5/src/cntr.o gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.5/src/cntr.o -L/usr/local/lib -o build/lib.linux-x86_64-2.5/matplotlib/_cntr.so building 'matplotlib._delaunay' extension creating build/temp.linux-x86_64-2.5/lib creating build/temp.linux-x86_64-2.5/lib/matplotlib creating build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c lib/matplotlib/delaunay/_delaunay.cpp -o build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/_delaunay.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* nn_interpolate_unstructured_method(PyObject*, PyObject*)’: lib/matplotlib/delaunay/_delaunay.cpp:469: warning: ‘intz’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* nn_interpolate_method(PyObject*, PyObject*)’: lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘y’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘z’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘centers’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘nodes’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:592: warning: ‘neighbors’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* compute_planes_method(PyObject*, PyObject*)’: lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘nodes’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘z’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:315: warning: ‘y’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* linear_interpolate_method(PyObject*, PyObject*)’: lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘neighbors’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘nodes’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘y’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:377: warning: ‘planes’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* getMesh(int, double*, double*)’: lib/matplotlib/delaunay/_delaunay.cpp:209: warning: ‘vertices’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:116: warning: ‘tri_nbrs’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp:116: warning: ‘tri_edges’ may be used uninitialized in this function lib/matplotlib/delaunay/_delaunay.cpp: In function ‘PyObject* delaunay_method(PyObject*, PyObject*)’: lib/matplotlib/delaunay/_delaunay.cpp:667: warning: ‘y’ may be used uninitialized in this function gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp -o build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/VoronoiDiagramGenerator.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp: In member function ‘bool VoronoiDiagramGenerator::voronoi(int)’: lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp:923: warning: ‘newintstar.Point::y’ may be used uninitialized in this function gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c lib/matplotlib/delaunay/delaunay_utils.cpp -o build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/delaunay_utils.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c lib/matplotlib/delaunay/natneighbors.cpp -o build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/natneighbors.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/_delaunay.o build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/VoronoiDiagramGenerator.o build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/delaunay_utils.o build/temp.linux-x86_64-2.5/lib/matplotlib/delaunay/natneighbors.o -L/usr/local/lib -o build/lib.linux-x86_64-2.5/matplotlib/_delaunay.so building 'matplotlib.nxutils' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c src/nxutils.c -o build/temp.linux-x86_64-2.5/src/nxutils.o gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.5/src/nxutils.o -L/usr/local/lib -o build/lib.linux-x86_64-2.5/matplotlib/nxutils.so building 'matplotlib._path' extension creating build/temp.linux-x86_64-2.5/agg24 creating build/temp.linux-x86_64-2.5/agg24/src gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/include/python2.5 -c agg24/src/agg_curves.cpp -o build/temp.linux-x86_64-2.5/agg24/src/agg_curves.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/include/python2.5 -c agg24/src/agg_bezier_arc.cpp -o build/temp.linux-x86_64-2.5/agg24/src/agg_bezier_arc.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/include/python2.5 -c agg24/src/agg_trans_affine.cpp -o build/temp.linux-x86_64-2.5/agg24/src/agg_trans_affine.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/include/python2.5 -c agg24/src/agg_vcgen_stroke.cpp -o build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_stroke.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/include/python2.5 -c src/agg_py_transforms.cpp -o build/temp.linux-x86_64-2.5/src/agg_py_transforms.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/include/python2.5 -c src/path_cleanup.cpp -o build/temp.linux-x86_64-2.5/src/path_cleanup.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/include/python2.5 -c src/path.cpp -o build/temp.linux-x86_64-2.5/src/path.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ src/path.cpp: In function ‘void clip_to_rect(PathIterator&, double, double, double, double, bool, std::vector<std::vector<XY, std::allocator<XY> >, std::allocator<std::vector<XY, std::allocator<XY> > > >&)’: src/path.cpp:821: warning: ‘y’ may be used uninitialized in this function src/path.cpp:821: warning: ‘x’ may be used uninitialized in this function g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.5/agg24/src/agg_curves.o build/temp.linux-x86_64-2.5/agg24/src/agg_bezier_arc.o build/temp.linux-x86_64-2.5/agg24/src/agg_trans_affine.o build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_stroke.o build/temp.linux-x86_64-2.5/CXX/cxxsupport.o build/temp.linux-x86_64-2.5/CXX/cxx_extensions.o build/temp.linux-x86_64-2.5/CXX/IndirectPythonInterface.o build/temp.linux-x86_64-2.5/CXX/cxxextensions.o build/temp.linux-x86_64-2.5/src/agg_py_transforms.o build/temp.linux-x86_64-2.5/src/path_cleanup.o build/temp.linux-x86_64-2.5/src/path.o -L/usr/local/lib -lstdc++ -lm -o build/lib.linux-x86_64-2.5/matplotlib/_path.so building 'matplotlib.backends._backend_agg' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c agg24/src/agg_vcgen_dash.cpp -o build/temp.linux-x86_64-2.5/agg24/src/agg_vcgen_dash.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c agg24/src/agg_image_filters.cpp -o build/temp.linux-x86_64-2.5/agg24/src/agg_image_filters.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c src/backend_agg.cpp -o build/temp.linux-x86_64-2.5/src/backend_agg.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ src/backend_agg.cpp:3:17: error: png.h: No such file or directory src/backend_agg.cpp: In member function ‘Py::Object RendererAgg::draw_image(const Py::Tuple&)’: src/backend_agg.cpp:824: warning: ‘h’ may be used uninitialized in this function src/backend_agg.cpp:824: warning: ‘w’ may be used uninitialized in this function error: command 'gcc' failed with exit status 1 |
|
From: william r. <wil...@gm...> - 2010-04-19 15:41:11
|
On the plus side, there is no longer an error when I apply the patch. On the downside, it generates a rather strange symbol instead of a perpendicular symbol....Let me try to quickly upgrade to 0.99.1. I did that and I seem to get the same error... On Mon, Apr 19, 2010 at 10:49 AM, Michael Droettboom <md...@st...>wrote: > Does forcibly casting the path to a string resolve the problem? i.e. > applying this patch: > > Index: mathtext.py > =================================================================== > --- mathtext.py (revision 8216) > +++ mathtext.py (working copy) > @@ -597,7 +597,7 @@ > > cached_font = self._fonts.get(basename) > if cached_font is None: > - font = FT2Font(basename) > + font = FT2Font(str(basename)) > cached_font = self.CachedFont(font) > self._fonts[basename] = cached_font > self._fonts[font.postscript_name] = cached_font > > Mike > > william ratcliff wrote: > >> Mike, >> >> The basename is: >> u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF' >> >> Let me try to find where my matplotlibrc file is located... >> >> Thanks, >> William >> >> On Mon, Apr 19, 2010 at 10:22 AM, Michael Droettboom <md...@st...<mailto: >> md...@st...>> wrote: >> >> One might see that error if the path to the font being used >> contains non-ascii characters (the "basename" variable in the last >> frame of the stack in the stacktrace). Is that possible? We may >> need to implement the same workaround we use for image files for >> loading fonts (which is to open the file with Python and pass a >> file handle to C++ rather than passing a string that may contain >> Unicode, which is difficult to handle in cross-platform way from >> C/C++). >> >> Mike >> >> william ratcliff wrote: >> >> I think the actual error was: >> TypeError: cannot return std::string from Unicode object >> >> It was the error returned when I walked through with a debugger... >> >> On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom >> <md...@st... <mailto:md...@st...> >> <mailto:md...@st... <mailto:md...@st...>>> wrote: >> >> It looks like the end of the traceback -- where the actual >> exception is named -- is missing. Can you repost it in its >> entirety? >> >> Mike >> >> william ratcliff wrote: >> >> Hi! I am using matplotlib 0.99.0 under windows xp. I >> tried >> the following: >> ax.text(.96,.80,r'$P \perp >> >> Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') >> and get the following error: >> (However, in figure labels, symbols using mathtext, such as >> theta seem to work fine...) >> >> Thanks, >> William >> >> TypeError: cannot return std::string from Unicode object >> File >> >> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", >> line 301, in <module> >> film110() >> File >> >> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", >> line 157, in film110 >> plt.show() >> File >> >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >> line 63, in show >> manager.window.show() >> File >> >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >> line 168, in resizeEvent >> self.draw() >> File >> >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", >> line 130, in draw >> FigureCanvasAgg.draw(self) >> File >> >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >> line 314, in draw >> self.figure.draw(self.renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", >> line 46, in draw_wrapper >> draw(artist, renderer, *kl) >> File "C:\Python25\Lib\site-packages\matplotlib\figure.py", >> line 774, in draw >> for a in self.axes: a.draw(renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", >> line 46, in draw_wrapper >> draw(artist, renderer, *kl) >> File >> "C:\Python25\Lib\site-packages\matplotlib\axes.py", line >> 1721, in draw >> a.draw(renderer) >> File >> "C:\Python25\Lib\site-packages\matplotlib\text.py", line >> 515, in draw >> bbox, info = self._get_layout(renderer) >> File >> "C:\Python25\Lib\site-packages\matplotlib\text.py", line >> 279, in _get_layout >> clean_line, self._fontproperties, ismath=ismath) >> File >> >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >> line 156, in get_text_width_height_descent >> self.mathtext_parser.parse(s, self.dpi, prop) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 2810, in parse >> box = self._parser.parse(s, font_output, fontsize, dpi) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 2259, in parse >> self._expression.parseString(s) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 1048, in parseString >> loc, tokens = self._parse( instring, 0 ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2307, in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2672, in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2307, in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2756, in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2714, in parseImpl >> loc, tmptokens = self.expr._parse( instring, preloc, >> doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2373, in parseImpl >> return maxMatchExp._parse( instring, loc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2416, in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2416, in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2293, in parseImpl >> loc, resultlist = self.exprs[0]._parse( instring, loc, >> doActions, callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2756, in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2373, in parseImpl >> return maxMatchExp._parse( instring, loc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2416, in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 950, in _parseNoCache >> tokens = fn( instring, tokensStart, retTokens ) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 2374, in symbol >> char = Char(c, self.get_state()) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 1264, in __init__ >> self._update_metrics() >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 1271, in _update_metrics >> self.font, self.font_class, self.c, self.fontsize, >> self.dpi) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 446, in get_metrics >> info = self._get_info(font, font_class, sym, fontsize, >> dpi) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 579, in _get_info >> self._get_glyph(fontname, font_class, sym, fontsize) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 697, in _get_glyph >> fontname, font_class, sym, fontsize) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 827, in _get_glyph >> cached_font = self._get_font(new_fontname) >> File >> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 560, in _get_font >> font = FT2Font(basename) >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed >> compiling, find >> bugs >> proactively, and fine-tune applications for parallel >> performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> <mailto:Mat...@li... >> <mailto:Mat...@li...>> >> >> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> -- Michael Droettboom >> Science Software Branch >> Operations and Engineering Division >> Space Telescope Science Institute >> Operated by AURA for NASA >> >> >> >> -- Michael Droettboom >> Science Software Branch >> Operations and Engineering Division >> Space Telescope Science Institute >> Operated by AURA for NASA >> >> >> > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > |
|
From: Michael D. <md...@st...> - 2010-04-19 14:49:47
|
Does forcibly casting the path to a string resolve the problem? i.e.
applying this patch:
Index: mathtext.py
===================================================================
--- mathtext.py (revision 8216)
+++ mathtext.py (working copy)
@@ -597,7 +597,7 @@
cached_font = self._fonts.get(basename)
if cached_font is None:
- font = FT2Font(basename)
+ font = FT2Font(str(basename))
cached_font = self.CachedFont(font)
self._fonts[basename] = cached_font
self._fonts[font.postscript_name] = cached_font
Mike
william ratcliff wrote:
> Mike,
>
> The basename is:
> u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF'
>
> Let me try to find where my matplotlibrc file is located...
>
> Thanks,
> William
>
> On Mon, Apr 19, 2010 at 10:22 AM, Michael Droettboom <md...@st...
> <mailto:md...@st...>> wrote:
>
> One might see that error if the path to the font being used
> contains non-ascii characters (the "basename" variable in the last
> frame of the stack in the stacktrace). Is that possible? We may
> need to implement the same workaround we use for image files for
> loading fonts (which is to open the file with Python and pass a
> file handle to C++ rather than passing a string that may contain
> Unicode, which is difficult to handle in cross-platform way from
> C/C++).
>
> Mike
>
> william ratcliff wrote:
>
> I think the actual error was:
> TypeError: cannot return std::string from Unicode object
>
> It was the error returned when I walked through with a debugger...
>
> On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom
> <md...@st... <mailto:md...@st...>
> <mailto:md...@st... <mailto:md...@st...>>> wrote:
>
> It looks like the end of the traceback -- where the actual
> exception is named -- is missing. Can you repost it in its
> entirety?
>
> Mike
>
> william ratcliff wrote:
>
> Hi! I am using matplotlib 0.99.0 under windows xp. I
> tried
> the following:
> ax.text(.96,.80,r'$P \perp
>
> Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black')
> and get the following error:
> (However, in figure labels, symbols using mathtext, such as
> theta seem to work fine...)
>
> Thanks,
> William
>
> TypeError: cannot return std::string from Unicode object
> File
>
> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py",
> line 301, in <module>
> film110()
> File
>
> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py",
> line 157, in film110
> plt.show()
> File
>
> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py",
> line 63, in show
> manager.window.show()
> File
>
> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py",
> line 168, in resizeEvent
> self.draw()
> File
>
> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py",
> line 130, in draw
> FigureCanvasAgg.draw(self)
> File
>
> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py",
> line 314, in draw
> self.figure.draw(self.renderer)
> File "C:\Python25\Lib\site-packages\matplotlib\artist.py",
> line 46, in draw_wrapper
> draw(artist, renderer, *kl)
> File "C:\Python25\Lib\site-packages\matplotlib\figure.py",
> line 774, in draw
> for a in self.axes: a.draw(renderer)
> File "C:\Python25\Lib\site-packages\matplotlib\artist.py",
> line 46, in draw_wrapper
> draw(artist, renderer, *kl)
> File
> "C:\Python25\Lib\site-packages\matplotlib\axes.py", line
> 1721, in draw
> a.draw(renderer)
> File
> "C:\Python25\Lib\site-packages\matplotlib\text.py", line
> 515, in draw
> bbox, info = self._get_layout(renderer)
> File
> "C:\Python25\Lib\site-packages\matplotlib\text.py", line
> 279, in _get_layout
> clean_line, self._fontproperties, ismath=ismath)
> File
>
> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py",
> line 156, in get_text_width_height_descent
> self.mathtext_parser.parse(s, self.dpi, prop)
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 2810, in parse
> box = self._parser.parse(s, font_output, fontsize, dpi)
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 2259, in parse
> self._expression.parseString(s)
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 1048, in parseString
> loc, tokens = self._parse( instring, 0 )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2559, in parseImpl
> return self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2307, in parseImpl
> loc, exprtokens = e._parse( instring, loc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2672, in parseImpl
> loc, tokens = self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2307, in parseImpl
> loc, exprtokens = e._parse( instring, loc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2756, in parseImpl
> loc, tokens = self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2714, in parseImpl
> loc, tmptokens = self.expr._parse( instring, preloc,
> doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2373, in parseImpl
> return maxMatchExp._parse( instring, loc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2559, in parseImpl
> return self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2416, in parseImpl
> ret = e._parse( instring, loc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2559, in parseImpl
> return self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2559, in parseImpl
> return self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2416, in parseImpl
> ret = e._parse( instring, loc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2293, in parseImpl
> loc, resultlist = self.exprs[0]._parse( instring, loc,
> doActions, callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2756, in parseImpl
> loc, tokens = self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2559, in parseImpl
> return self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2373, in parseImpl
> return maxMatchExp._parse( instring, loc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 924, in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 2416, in parseImpl
> ret = e._parse( instring, loc, doActions )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 981, in _parseCache
> value = self._parseNoCache( instring, loc, doActions,
> callPreParse )
> File
> "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py",
> line 950, in _parseNoCache
> tokens = fn( instring, tokensStart, retTokens )
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 2374, in symbol
> char = Char(c, self.get_state())
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 1264, in __init__
> self._update_metrics()
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 1271, in _update_metrics
> self.font, self.font_class, self.c, self.fontsize,
> self.dpi)
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 446, in get_metrics
> info = self._get_info(font, font_class, sym, fontsize,
> dpi)
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 579, in _get_info
> self._get_glyph(fontname, font_class, sym, fontsize)
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 697, in _get_glyph
> fontname, font_class, sym, fontsize)
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 827, in _get_glyph
> cached_font = self._get_font(new_fontname)
> File
> "C:\Python25\Lib\site-packages\matplotlib\mathtext.py",
> line 560, in _get_font
> font = FT2Font(basename)
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed
> compiling, find
> bugs
> proactively, and fine-tune applications for parallel
> performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> <mailto:Mat...@li...
> <mailto:Mat...@li...>>
>
>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> -- Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>
>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: william r. <wil...@gm...> - 2010-04-19 14:44:47
|
Assuming that the matplotlibrc file being read is in mpl-data, here is the relevant section: ### FONT # # font properties used by text.Text. See # http://matplotlib.sourceforge.net/api/font_manager_api.html for more # information on font properties. The 6 font properties used for font # matching are given below with their default values. # # The font.family property has five values: 'serif' (e.g. Times), # 'sans-serif' (e.g. Helvetica), 'cursive' (e.g. Zapf-Chancery), # 'fantasy' (e.g. Western), and 'monospace' (e.g. Courier). Each of # these font families has a default list of font names in decreasing # order of priority associated with them. # # The font.style property has three values: normal (or roman), italic # or oblique. The oblique style will be used for italic, if it is not # present. # # The font.variant property has two values: normal or small-caps. For # TrueType fonts, which are scalable fonts, small-caps is equivalent # to using a font size of 'smaller', or about 83% of the current font # size. # # The font.weight property has effectively 13 values: normal, bold, # bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as # 400, and bold is 700. bolder and lighter are relative values with # respect to the current weight. # # The font.stretch property has 11 values: ultra-condensed, # extra-condensed, condensed, semi-condensed, normal, semi-expanded, # expanded, extra-expanded, ultra-expanded, wider, and narrower. This # property is not currently implemented. # # The font.size property is the default font size for text, given in pts. # 12pt is the standard value. # #font.family : sans-serif #font.style : normal #font.variant : normal #font.weight : medium #font.stretch : normal # note that font.size controls default text sizes. To configure # special text sizes tick labels, axes, labels, title, etc, see the rc # settings for axes and ticks. Special text sizes can be defined # relative to font.size, using the following values: xx-small, x-small, # small, medium, large, x-large, xx-large, larger, or smaller #font.size : 12.0 #font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif #font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif #font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive #font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy #font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace ### TEXT # text properties used by text.Text. See # http://matplotlib.sourceforge.net/api/artist_api.html#module-matplotlib.textfor more # information on text properties #text.color : black ### LaTeX customizations. See http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex #text.usetex : False # use latex for all text handling. The following fonts # are supported through the usual rc parameter settings: # new century schoolbook, bookman, times, palatino, # zapf chancery, charter, serif, sans-serif, helvetica, # avant garde, courier, monospace, computer modern roman, # computer modern sans serif, computer modern typewriter # If another font is desired which can loaded using the # LaTeX \usepackage command, please inquire at the # matplotlib mailing list #text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling # unicode strings. #text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. # preamble is a comma separated list of LaTeX statements # that are included in the LaTeX document preamble. # An example: # text.latex.preamble : \usepackage{bm},\usepackage{euler} # The following packages are always loaded with usetex, so # beware of package collisions: color, geometry, graphicx, # type1cm, textcomp. Adobe Postscript (PSSNFS) font packages # may also be loaded, depending on your font settings #text.dvipnghack : None # some versions of dvipng don't handle alpha # channel properly. Use True to correct # and flush ~/.matplotlib/tex.cache # before testing and False to force # correction off. None will try and # guess based on your dvipng version #text.markup : 'plain' # Affects how text, such as titles and labels, are # interpreted by default. # 'plain': As plain, unformatted text # 'tex': As TeX-like text. Text between $'s will be # formatted as a TeX math expression. # This setting has no effect when text.usetex is True. # In that case, all text will be sent to TeX for # processing. # The following settings allow you to select the fonts in math mode. # They map from a TeX font name to a fontconfig font pattern. # These settings are only used if mathtext.fontset is 'custom'. # Note that this "custom" mode is unsupported and may go away in the # future. #mathtext.cal : cursive #mathtext.rm : serif #mathtext.tt : monospace #mathtext.it : serif:italic #mathtext.bf : serif:bold #mathtext.sf : sans #mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix', # 'stixsans' or 'custom' #mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern # fonts when a symbol can not be found in one of # the custom math fonts. #mathtext.default : it # The default font to use for math. # Can be any of the LaTeX font names, including # the special name "regular" for the same font # used in regular text. On Mon, Apr 19, 2010 at 10:41 AM, william ratcliff < wil...@gm...> wrote: > Mike, > > The basename is: > u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF' > > Let me try to find where my matplotlibrc file is located... > > Thanks, > William > > > On Mon, Apr 19, 2010 at 10:22 AM, Michael Droettboom <md...@st...>wrote: > >> One might see that error if the path to the font being used contains >> non-ascii characters (the "basename" variable in the last frame of the stack >> in the stacktrace). Is that possible? We may need to implement the same >> workaround we use for image files for loading fonts (which is to open the >> file with Python and pass a file handle to C++ rather than passing a string >> that may contain Unicode, which is difficult to handle in cross-platform way >> from C/C++). >> >> Mike >> >> william ratcliff wrote: >> >>> I think the actual error was: >>> TypeError: cannot return std::string from Unicode object >>> >>> It was the error returned when I walked through with a debugger... >>> >>> On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom <md...@st...<mailto: >>> md...@st...>> wrote: >>> >>> It looks like the end of the traceback -- where the actual >>> exception is named -- is missing. Can you repost it in its entirety? >>> >>> Mike >>> >>> william ratcliff wrote: >>> >>> Hi! I am using matplotlib 0.99.0 under windows xp. I tried >>> the following: >>> ax.text(.96,.80,r'$P \perp >>> >>> Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') >>> and get the following error: >>> (However, in figure labels, symbols using mathtext, such as >>> theta seem to work fine...) >>> >>> Thanks, >>> William >>> >>> TypeError: cannot return std::string from Unicode object >>> File >>> >>> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", >>> line 301, in <module> >>> film110() >>> File >>> >>> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", >>> line 157, in film110 >>> plt.show() >>> File >>> >>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >>> line 63, in show >>> manager.window.show() >>> File >>> >>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >>> line 168, in resizeEvent >>> self.draw() >>> File >>> >>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", >>> line 130, in draw >>> FigureCanvasAgg.draw(self) >>> File >>> >>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >>> line 314, in draw >>> self.figure.draw(self.renderer) >>> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", >>> line 46, in draw_wrapper >>> draw(artist, renderer, *kl) >>> File "C:\Python25\Lib\site-packages\matplotlib\figure.py", >>> line 774, in draw >>> for a in self.axes: a.draw(renderer) >>> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", >>> line 46, in draw_wrapper >>> draw(artist, renderer, *kl) >>> File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line >>> 1721, in draw >>> a.draw(renderer) >>> File "C:\Python25\Lib\site-packages\matplotlib\text.py", line >>> 515, in draw >>> bbox, info = self._get_layout(renderer) >>> File "C:\Python25\Lib\site-packages\matplotlib\text.py", line >>> 279, in _get_layout >>> clean_line, self._fontproperties, ismath=ismath) >>> File >>> >>> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >>> line 156, in get_text_width_height_descent >>> self.mathtext_parser.parse(s, self.dpi, prop) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 2810, in parse >>> box = self._parser.parse(s, font_output, fontsize, dpi) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 2259, in parse >>> self._expression.parseString(s) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 1048, in parseString >>> loc, tokens = self._parse( instring, 0 ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2559, in parseImpl >>> return self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2307, in parseImpl >>> loc, exprtokens = e._parse( instring, loc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2672, in parseImpl >>> loc, tokens = self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2307, in parseImpl >>> loc, exprtokens = e._parse( instring, loc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2756, in parseImpl >>> loc, tokens = self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2714, in parseImpl >>> loc, tmptokens = self.expr._parse( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2373, in parseImpl >>> return maxMatchExp._parse( instring, loc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2559, in parseImpl >>> return self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2416, in parseImpl >>> ret = e._parse( instring, loc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2559, in parseImpl >>> return self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2559, in parseImpl >>> return self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2416, in parseImpl >>> ret = e._parse( instring, loc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2293, in parseImpl >>> loc, resultlist = self.exprs[0]._parse( instring, loc, >>> doActions, callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2756, in parseImpl >>> loc, tokens = self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2559, in parseImpl >>> return self.expr._parse( instring, loc, doActions, >>> callPreParse=False ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2373, in parseImpl >>> return maxMatchExp._parse( instring, loc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 924, in _parseNoCache >>> loc,tokens = self.parseImpl( instring, preloc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 2416, in parseImpl >>> ret = e._parse( instring, loc, doActions ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 981, in _parseCache >>> value = self._parseNoCache( instring, loc, doActions, >>> callPreParse ) >>> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >>> line 950, in _parseNoCache >>> tokens = fn( instring, tokensStart, retTokens ) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 2374, in symbol >>> char = Char(c, self.get_state()) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 1264, in __init__ >>> self._update_metrics() >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 1271, in _update_metrics >>> self.font, self.font_class, self.c, self.fontsize, self.dpi) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 446, in get_metrics >>> info = self._get_info(font, font_class, sym, fontsize, dpi) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 579, in _get_info >>> self._get_glyph(fontname, font_class, sym, fontsize) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 697, in _get_glyph >>> fontname, font_class, sym, fontsize) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 827, in _get_glyph >>> cached_font = self._get_font(new_fontname) >>> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >>> line 560, in _get_font >>> font = FT2Font(basename) >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find >>> bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> <mailto:Mat...@li...> >>> >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> >>> -- Michael Droettboom >>> Science Software Branch >>> Operations and Engineering Division >>> Space Telescope Science Institute >>> Operated by AURA for NASA >>> >>> >>> >> -- >> Michael Droettboom >> Science Software Branch >> Operations and Engineering Division >> Space Telescope Science Institute >> Operated by AURA for NASA >> >> > |
|
From: william r. <wil...@gm...> - 2010-04-19 14:41:44
|
Mike, The basename is: u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF' Let me try to find where my matplotlibrc file is located... Thanks, William On Mon, Apr 19, 2010 at 10:22 AM, Michael Droettboom <md...@st...>wrote: > One might see that error if the path to the font being used contains > non-ascii characters (the "basename" variable in the last frame of the stack > in the stacktrace). Is that possible? We may need to implement the same > workaround we use for image files for loading fonts (which is to open the > file with Python and pass a file handle to C++ rather than passing a string > that may contain Unicode, which is difficult to handle in cross-platform way > from C/C++). > > Mike > > william ratcliff wrote: > >> I think the actual error was: >> TypeError: cannot return std::string from Unicode object >> >> It was the error returned when I walked through with a debugger... >> >> On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom <md...@st...<mailto: >> md...@st...>> wrote: >> >> It looks like the end of the traceback -- where the actual >> exception is named -- is missing. Can you repost it in its entirety? >> >> Mike >> >> william ratcliff wrote: >> >> Hi! I am using matplotlib 0.99.0 under windows xp. I tried >> the following: >> ax.text(.96,.80,r'$P \perp >> >> Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') >> and get the following error: >> (However, in figure labels, symbols using mathtext, such as >> theta seem to work fine...) >> >> Thanks, >> William >> >> TypeError: cannot return std::string from Unicode object >> File >> >> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", >> line 301, in <module> >> film110() >> File >> >> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", >> line 157, in film110 >> plt.show() >> File >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >> line 63, in show >> manager.window.show() >> File >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >> line 168, in resizeEvent >> self.draw() >> File >> >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", >> line 130, in draw >> FigureCanvasAgg.draw(self) >> File >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >> line 314, in draw >> self.figure.draw(self.renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", >> line 46, in draw_wrapper >> draw(artist, renderer, *kl) >> File "C:\Python25\Lib\site-packages\matplotlib\figure.py", >> line 774, in draw >> for a in self.axes: a.draw(renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", >> line 46, in draw_wrapper >> draw(artist, renderer, *kl) >> File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line >> 1721, in draw >> a.draw(renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\text.py", line >> 515, in draw >> bbox, info = self._get_layout(renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\text.py", line >> 279, in _get_layout >> clean_line, self._fontproperties, ismath=ismath) >> File >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >> line 156, in get_text_width_height_descent >> self.mathtext_parser.parse(s, self.dpi, prop) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 2810, in parse >> box = self._parser.parse(s, font_output, fontsize, dpi) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 2259, in parse >> self._expression.parseString(s) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 1048, in parseString >> loc, tokens = self._parse( instring, 0 ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2307, in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2672, in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2307, in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2756, in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2714, in parseImpl >> loc, tmptokens = self.expr._parse( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2373, in parseImpl >> return maxMatchExp._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2416, in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2416, in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2293, in parseImpl >> loc, resultlist = self.exprs[0]._parse( instring, loc, >> doActions, callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2756, in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2559, in parseImpl >> return self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2373, in parseImpl >> return maxMatchExp._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 924, in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 2416, in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 981, in _parseCache >> value = self._parseNoCache( instring, loc, doActions, >> callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", >> line 950, in _parseNoCache >> tokens = fn( instring, tokensStart, retTokens ) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 2374, in symbol >> char = Char(c, self.get_state()) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 1264, in __init__ >> self._update_metrics() >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 1271, in _update_metrics >> self.font, self.font_class, self.c, self.fontsize, self.dpi) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 446, in get_metrics >> info = self._get_info(font, font_class, sym, fontsize, dpi) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 579, in _get_info >> self._get_glyph(fontname, font_class, sym, fontsize) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 697, in _get_glyph >> fontname, font_class, sym, fontsize) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 827, in _get_glyph >> cached_font = self._get_font(new_fontname) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", >> line 560, in _get_font >> font = FT2Font(basename) >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find >> bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> -- Michael Droettboom >> Science Software Branch >> Operations and Engineering Division >> Space Telescope Science Institute >> Operated by AURA for NASA >> >> >> > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > |
|
From: Michael D. <md...@st...> - 2010-04-19 14:22:26
|
One might see that error if the path to the font being used contains non-ascii characters (the "basename" variable in the last frame of the stack in the stacktrace). Is that possible? We may need to implement the same workaround we use for image files for loading fonts (which is to open the file with Python and pass a file handle to C++ rather than passing a string that may contain Unicode, which is difficult to handle in cross-platform way from C/C++). Mike william ratcliff wrote: > I think the actual error was: > TypeError: cannot return std::string from Unicode object > > It was the error returned when I walked through with a debugger... > > On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom <md...@st... > <mailto:md...@st...>> wrote: > > It looks like the end of the traceback -- where the actual > exception is named -- is missing. Can you repost it in its entirety? > > Mike > > william ratcliff wrote: > > Hi! I am using matplotlib 0.99.0 under windows xp. I tried > the following: > ax.text(.96,.80,r'$P \perp > Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') > and get the following error: > (However, in figure labels, symbols using mathtext, such as > theta seem to work fine...) > > Thanks, > William > > TypeError: cannot return std::string from Unicode object > File > "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", > line 301, in <module> > film110() > File > "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", > line 157, in film110 > plt.show() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", > line 63, in show > manager.window.show() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", > line 168, in resizeEvent > self.draw() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", > line 130, in draw > FigureCanvasAgg.draw(self) > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 314, in draw > self.figure.draw(self.renderer) > File "C:\Python25\Lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *kl) > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", > line 774, in draw > for a in self.axes: a.draw(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *kl) > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line > 1721, in draw > a.draw(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line > 515, in draw > bbox, info = self._get_layout(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line > 279, in _get_layout > clean_line, self._fontproperties, ismath=ismath) > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 156, in get_text_width_height_descent > self.mathtext_parser.parse(s, self.dpi, prop) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 2810, in parse > box = self._parser.parse(s, font_output, fontsize, dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 2259, in parse > self._expression.parseString(s) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 1048, in parseString > loc, tokens = self._parse( instring, 0 ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2307, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2672, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2307, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2756, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2714, in parseImpl > loc, tmptokens = self.expr._parse( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2373, in parseImpl > return maxMatchExp._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2293, in parseImpl > loc, resultlist = self.exprs[0]._parse( instring, loc, > doActions, callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2756, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2373, in parseImpl > return maxMatchExp._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 950, in _parseNoCache > tokens = fn( instring, tokensStart, retTokens ) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 2374, in symbol > char = Char(c, self.get_state()) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 1264, in __init__ > self._update_metrics() > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 1271, in _update_metrics > self.font, self.font_class, self.c, self.fontsize, self.dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 446, in get_metrics > info = self._get_info(font, font_class, sym, fontsize, dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 579, in _get_info > self._get_glyph(fontname, font_class, sym, fontsize) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 697, in _get_glyph > fontname, font_class, sym, fontsize) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 827, in _get_glyph > cached_font = self._get_font(new_fontname) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 560, in _get_font > font = FT2Font(basename) > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find > bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2010-04-19 14:18:21
|
I'm not able to reproduce that here, with either SVN or 0.99.1.2. Do you have any font-related or mathtext-related settings in your matplotlibrc? Mike william ratcliff wrote: > I think the actual error was: > TypeError: cannot return std::string from Unicode object > > It was the error returned when I walked through with a debugger... > > On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom <md...@st... > <mailto:md...@st...>> wrote: > > It looks like the end of the traceback -- where the actual > exception is named -- is missing. Can you repost it in its entirety? > > Mike > > william ratcliff wrote: > > Hi! I am using matplotlib 0.99.0 under windows xp. I tried > the following: > ax.text(.96,.80,r'$P \perp > Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') > and get the following error: > (However, in figure labels, symbols using mathtext, such as > theta seem to work fine...) > > Thanks, > William > > TypeError: cannot return std::string from Unicode object > File > "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", > line 301, in <module> > film110() > File > "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", > line 157, in film110 > plt.show() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", > line 63, in show > manager.window.show() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", > line 168, in resizeEvent > self.draw() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", > line 130, in draw > FigureCanvasAgg.draw(self) > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 314, in draw > self.figure.draw(self.renderer) > File "C:\Python25\Lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *kl) > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", > line 774, in draw > for a in self.axes: a.draw(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *kl) > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line > 1721, in draw > a.draw(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line > 515, in draw > bbox, info = self._get_layout(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line > 279, in _get_layout > clean_line, self._fontproperties, ismath=ismath) > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 156, in get_text_width_height_descent > self.mathtext_parser.parse(s, self.dpi, prop) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 2810, in parse > box = self._parser.parse(s, font_output, fontsize, dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 2259, in parse > self._expression.parseString(s) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 1048, in parseString > loc, tokens = self._parse( instring, 0 ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2307, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2672, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2307, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2756, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2714, in parseImpl > loc, tmptokens = self.expr._parse( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2373, in parseImpl > return maxMatchExp._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2293, in parseImpl > loc, resultlist = self.exprs[0]._parse( instring, loc, > doActions, callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2756, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2373, in parseImpl > return maxMatchExp._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, > callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", > line 950, in _parseNoCache > tokens = fn( instring, tokensStart, retTokens ) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 2374, in symbol > char = Char(c, self.get_state()) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 1264, in __init__ > self._update_metrics() > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 1271, in _update_metrics > self.font, self.font_class, self.c, self.fontsize, self.dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 446, in get_metrics > info = self._get_info(font, font_class, sym, fontsize, dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 579, in _get_info > self._get_glyph(fontname, font_class, sym, fontsize) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 697, in _get_glyph > fontname, font_class, sym, fontsize) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 827, in _get_glyph > cached_font = self._get_font(new_fontname) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", > line 560, in _get_font > font = FT2Font(basename) > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find > bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: william r. <wil...@gm...> - 2010-04-19 14:00:30
|
I think the actual error was: TypeError: cannot return std::string from Unicode object It was the error returned when I walked through with a debugger... On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom <md...@st...> wrote: > It looks like the end of the traceback -- where the actual exception is > named -- is missing. Can you repost it in its entirety? > > Mike > > william ratcliff wrote: > >> Hi! I am using matplotlib 0.99.0 under windows xp. I tried the >> following: >> ax.text(.96,.80,r'$P \perp >> Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') >> and get the following error: >> (However, in figure labels, symbols using mathtext, such as theta seem to >> work fine...) >> >> Thanks, >> William >> >> TypeError: cannot return std::string from Unicode object >> File >> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", line >> 301, in <module> >> film110() >> File >> "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", line >> 157, in film110 >> plt.show() >> File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >> line 63, in show >> manager.window.show() >> File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", >> line 168, in resizeEvent >> self.draw() >> File >> "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", line >> 130, in draw >> FigureCanvasAgg.draw(self) >> File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >> line 314, in draw >> self.figure.draw(self.renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in >> draw_wrapper >> draw(artist, renderer, *kl) >> File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 774, in >> draw >> for a in self.axes: a.draw(renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in >> draw_wrapper >> draw(artist, renderer, *kl) >> File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1721, in >> draw >> a.draw(renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 515, in draw >> bbox, info = self._get_layout(renderer) >> File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 279, in >> _get_layout >> clean_line, self._fontproperties, ismath=ismath) >> File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", >> line 156, in get_text_width_height_descent >> self.mathtext_parser.parse(s, self.dpi, prop) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 2810, in >> parse >> box = self._parser.parse(s, font_output, fontsize, dpi) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 2259, in >> parse >> self._expression.parseString(s) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 1048, >> in parseString >> loc, tokens = self._parse( instring, 0 ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, >> in parseImpl >> return self.expr._parse( instring, loc, doActions, callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2307, >> in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2672, >> in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2307, >> in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2756, >> in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2714, >> in parseImpl >> loc, tmptokens = self.expr._parse( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2373, >> in parseImpl >> return maxMatchExp._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, >> in parseImpl >> return self.expr._parse( instring, loc, doActions, callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2416, >> in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, >> in parseImpl >> return self.expr._parse( instring, loc, doActions, callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, >> in parseImpl >> return self.expr._parse( instring, loc, doActions, callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2416, >> in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2293, >> in parseImpl >> loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2756, >> in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, >> in parseImpl >> return self.expr._parse( instring, loc, doActions, callPreParse=False ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2373, >> in parseImpl >> return maxMatchExp._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in >> _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2416, >> in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in >> _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 950, in >> _parseNoCache >> tokens = fn( instring, tokensStart, retTokens ) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 2374, in >> symbol >> char = Char(c, self.get_state()) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 1264, in >> __init__ >> self._update_metrics() >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 1271, in >> _update_metrics >> self.font, self.font_class, self.c, self.fontsize, self.dpi) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 446, in >> get_metrics >> info = self._get_info(font, font_class, sym, fontsize, dpi) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 579, in >> _get_info >> self._get_glyph(fontname, font_class, sym, fontsize) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 697, in >> _get_glyph >> fontname, font_class, sym, fontsize) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 827, in >> _get_glyph >> cached_font = self._get_font(new_fontname) >> File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 560, in >> _get_font >> font = FT2Font(basename) >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > |
|
From: Friedrich R. <fri...@gm...> - 2010-04-19 13:52:42
|
http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.FuncFormatter 2010/4/10 konstellationen <kon...@gm...>: > > For future reference, the solution proposed by Gökhan and Diakronik is to > replace the Latex tick-labels with strings: > >>import matplotlib.pyplt as plt >>tick_locs = range(start, stop, increment) >>plt.xticks(tick_locs, [r"$\mathbf{%s}$" % x for x in tick_locs]) > > If you have twin x or y axes (my case), the solution I found was: > > (Note: this solution is essentially the same as the one above, with the > distinction that every entry is set manually, which allows for more > flexibility, but requires more work) > > >>from mpl_toolkits.axes_grid.parasite_axes import SubplotHost >>from matplotlib.pylab import * # For plotting graphs. >>from matplotlib.pyplot import * > >>fig=figure(1) >>host= SubplotHost(fig,111) >>fig.add_subplot(host) >>par=host.twiny() > >>host.axis["bottom"] >>par.axis["top"] > >>hostv=[1e-14,1e-4,-1.5,1.5] >>host.axis(hostv) >>parv=[1e-8,1e2,-1.5,0.5] >>par.axis(parv) > >>host.set_xticks([1e-14, ... ,1e-4]) >>x_labels = [r'\boldmath $10^{-14} $', ... ,r'\boldmath $ $'] >>host.set_xticklabels(x_labels) > >>par.set_xticks([1e-8, ... ,1e2]) >>parx_labels = [ r'\boldmath $10^{-8}$', ... ,r'\boldmath $ $' ] >>par.set_xticklabels(parx_labels) > >>host.set_yticks([-1,0]) >>y_labels = [r'\boldmath $-1$', r'\boldmath $0$'] >>host.set_yticklabels(y_labels) > > > Result: > > http://old.nabble.com/file/p28199345/Picture%2B7.png There is another technique based on the FuncFormatter or the FormatStrFormatter in matplotlib.ticker, see the link at the very top. It makes less efford when one can rely on the automatic ticking mechanism and when one has access to the axis (with i) instances. It is: To obtain math-formatted number output: >>> formatter = matplotlib.ticker.FormatStrFormatter('$%g$') >>> axes.xaxis.set_major_formatter(formatter) The most important is that one has no longer to set the tick locations manually. For exponential ticks, I would propose (but it's untested): >>> def exp_fmt(loc): exponent = numpy.round(numpy.log10(loc)) return '$10^%d$' % exponent >>> formatter = matplotlib.ticker.FuncFormatter(exp_fmt) >>> # And so on. Note that using r'$\mathbf{%g}$' makes, for me, no difference. It may be that one needs matplotlib.rc('text', usetex = True) to make also numbers bold by \mathbf{}, but iirc, also in LaTeX numbers are always plain, also in \mathbf{}. \boldmath$$ may be an exception from this rule. fwiw, Friedrich P.S.: I cannot test usetex = True at the moment, because I end up with the error 'Could not obtain dvipng version'. |
|
From: Michael D. <md...@st...> - 2010-04-19 13:05:52
|
I'm not sure I understand the question. Can you provide a standalone script that illustrates the problem, or at least a picture? Mike Samuel Teixeira Santos wrote: > anyone could give me a hint about? > > > > 2010/4/16 Samuel Teixeira Santos <arc...@gm... > <mailto:arc...@gm...>> > > Hi all... > > my code is that: http://dpaste.com/184551/ > > the problem is that code is using on an web app. > > When I request the graph after press submit button > they generate the graph perfect > > I do that for 6, 7 times with the same value to generate the graph > so after that the graph breaks, like if exceed the values to > generate the graph > and became a single line... > > > what I have to do to fix that? > > > thanks in advanced... > > > Samuel > > p.s.: I note if I restart the application (like go to home of my > web app and restart the process to call the form to fill data and > request the graph, they fix, but when I request again with the > form already filled before, they break the graph on second request... > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2010-04-19 13:03:22
|
The problem is really that the window is too small, the text is too
large, and/or the axes is too large within the figure.
Try one or more of the following:
Replace the values for win.set_default_size to something larger, eg.
win.set_default_size(800,600)
Replace the fig.add_subplot call with a fig.add_axes call that
explicitly specifies the axes position:
ax = fig.add_axes((0.2, 0.2, 0.6, 0.6))
Reduce the font size by adding the following to the top:
from matplotlib import rcParams
rcParams['font.size'] = 4
Reduce the dpi of the plot:
fig = Figure(figsize=(5,4), dpi=60)
Cheers,
Mike
Vamsi Vytla wrote:
> Adding line:
> ax.set_xlabel("asdf")
>
> To file (matplotlib examples):
> http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk2.py
>
> This sets the X-Label under the navigation toolbar. I am unable to
> set it such a way that the entire canvas is rendered in the container.
>
> It would be of great help to know how this can be done.
>
> Thanks,
> W
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Michael D. <md...@st...> - 2010-04-19 12:55:21
|
It's not currently possible, but could be added by defining another directive option and passing that to the savefig call within the plot directive. If you're not able to do this yourself, would you mind filing a bug and linking to it here so it doesn't get forgotten? Mike Thomas Robitaille wrote: > Hello, > > I am currently using the sphinxext module to write documentation that includes automatically generated plots. I was wondering if there is a way to override the default savefig behavior for this - for example, I would like all the plots for the documentation to have the bbox_inches='tight' option to avoid any unnecessary whitespace. Is this something that can be done? > > Thanks, > > Thomas > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2010-04-19 12:54:28
|
It looks like the end of the traceback -- where the actual exception is named -- is missing. Can you repost it in its entirety? Mike william ratcliff wrote: > Hi! I am using matplotlib 0.99.0 under windows xp. I tried the > following: > ax.text(.96,.80,r'$P \perp > Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') > > and get the following error: > (However, in figure labels, symbols using mathtext, such as theta seem > to work fine...) > > Thanks, > William > > TypeError: cannot return std::string from Unicode object > File > "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", > line 301, in <module> > film110() > File > "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", > line 157, in film110 > plt.show() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", > line 63, in show > manager.window.show() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", > line 168, in resizeEvent > self.draw() > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", > line 130, in draw > FigureCanvasAgg.draw(self) > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 314, in draw > self.figure.draw(self.renderer) > File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in > draw_wrapper > draw(artist, renderer, *kl) > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 774, > in draw > for a in self.axes: a.draw(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in > draw_wrapper > draw(artist, renderer, *kl) > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1721, in > draw > a.draw(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 515, in draw > bbox, info = self._get_layout(renderer) > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 279, in > _get_layout > clean_line, self._fontproperties, ismath=ismath) > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 156, in get_text_width_height_descent > self.mathtext_parser.parse(s, self.dpi, prop) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line > 2810, in parse > box = self._parser.parse(s, font_output, fontsize, dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line > 2259, in parse > self._expression.parseString(s) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 1048, in parseString > loc, tokens = self._parse( instring, 0 ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2307, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2672, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2307, in parseImpl > loc, exprtokens = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2756, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2714, in parseImpl > loc, tmptokens = self.expr._parse( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2373, in parseImpl > return maxMatchExp._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2293, in parseImpl > loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2756, in parseImpl > loc, tokens = self.expr._parse( instring, loc, doActions, > callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2559, in parseImpl > return self.expr._parse( instring, loc, doActions, callPreParse=False ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2373, in parseImpl > return maxMatchExp._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 924, in _parseNoCache > loc,tokens = self.parseImpl( instring, preloc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 2416, in parseImpl > ret = e._parse( instring, loc, doActions ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 981, in _parseCache > value = self._parseNoCache( instring, loc, doActions, callPreParse ) > File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line > 950, in _parseNoCache > tokens = fn( instring, tokensStart, retTokens ) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line > 2374, in symbol > char = Char(c, self.get_state()) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line > 1264, in __init__ > self._update_metrics() > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line > 1271, in _update_metrics > self.font, self.font_class, self.c, self.fontsize, self.dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 446, > in get_metrics > info = self._get_info(font, font_class, sym, fontsize, dpi) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 579, > in _get_info > self._get_glyph(fontname, font_class, sym, fontsize) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 697, > in _get_glyph > fontname, font_class, sym, fontsize) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 827, > in _get_glyph > cached_font = self._get_font(new_fontname) > File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 560, > in _get_font > font = FT2Font(basename) > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Mauro C. <mau...@gm...> - 2010-04-19 12:09:48
|
That's it. I had precisely these same problems when upgrading from Python 2.5 to 2.6 (which in turn happened when I upgraded from Ubuntu Intrepid to Jaunty, which BTW is *much better* than Intrepid). All issues were instantly solved by installing the Python development packages. Best wishes, 2010/4/19 Darren Dale <dsd...@gm...>: > On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim <luk...@gm...> wrote: >> On 04/19/2010 01:52 PM, C M wrote: >>> My goal is to just get the lastest svn version of matplotlib, or, if >>> not that, just the 0.99 version, up and working on my Linux (Intrepid >>> Ibex) computer. I checked it matplotlib out from svn fine, and then, >>> as per the webpage, did: >>> >>>> cd matplotlib >>>> python setup.py install >>> >>> and that resulted in a very large amount of errors. I'll post them at >>> the bottom of this message, since there are many lines. >>> >>> I previously had 0.98.x installed, via the Ubuntu repositories, but I >>> have uninstalled it. My version is: >>> Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 >>> x86_64 GNU/Linux >>> >>> Any help is appreciated. Thank you, >>> Che >>> >>> Errors (starting from a few lines before): >>> >>> creating build/temp.linux-x86_64-2.5/src >>> creating build/temp.linux-x86_64-2.5/CXX >>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >>> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >>> -DPYCXX_ISO_CPP_LIB=1 >>> -I/usr/lib/python2.5/site-packages/numpy/core/include >>> -I/usr/local/include -I/usr/include -I. >>> -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 >>> -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 >>> -I/usr/include/python2.5 -c src/ft2font.cpp -o >>> build/temp.linux-x86_64-2.5/src/ft2font.o >>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >>> for Ada/C/ObjC but not for C++ >>> In file included from ./CXX/Extensions.hxx:37, >>> from src/ft2font.h:4, >>> from src/ft2font.cpp:1: >>> ./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory >> >> You seem not to have the development package of python installed. >> Try "sudo apt-get install python-dev". > > It looks like you are need to install libfreetype6-dev. Any time you > see missing .h files in your output, it means you need to install the > development headers for that package. > > Darren > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Dr. Mauro J. Cavalcanti P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: mau...@gm... Web: http://sites.google.com/site/maurobio Linux Registered User #473524 * Ubuntu User #22717 |
|
From: Samuel T. S. <arc...@gm...> - 2010-04-19 12:09:05
|
anyone could give me a hint about? 2010/4/16 Samuel Teixeira Santos <arc...@gm...> > Hi all... > > my code is that: http://dpaste.com/184551/ > > the problem is that code is using on an web app. > > When I request the graph after press submit button > they generate the graph perfect > > I do that for 6, 7 times with the same value to generate the graph > so after that the graph breaks, like if exceed the values to generate the > graph > and became a single line... > > > what I have to do to fix that? > > > thanks in advanced... > > > Samuel > > p.s.: I note if I restart the application (like go to home of my web app > and restart the process to call the form to fill data and request the graph, > they fix, but when I request again with the form already filled before, they > break the graph on second request... > |
|
From: Darren D. <dsd...@gm...> - 2010-04-19 12:03:04
|
On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim <luk...@gm...> wrote: > On 04/19/2010 01:52 PM, C M wrote: >> My goal is to just get the lastest svn version of matplotlib, or, if >> not that, just the 0.99 version, up and working on my Linux (Intrepid >> Ibex) computer. I checked it matplotlib out from svn fine, and then, >> as per the webpage, did: >> >>> cd matplotlib >>> python setup.py install >> >> and that resulted in a very large amount of errors. I'll post them at >> the bottom of this message, since there are many lines. >> >> I previously had 0.98.x installed, via the Ubuntu repositories, but I >> have uninstalled it. My version is: >> Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 >> x86_64 GNU/Linux >> >> Any help is appreciated. Thank you, >> Che >> >> Errors (starting from a few lines before): >> >> creating build/temp.linux-x86_64-2.5/src >> creating build/temp.linux-x86_64-2.5/CXX >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API >> -DPYCXX_ISO_CPP_LIB=1 >> -I/usr/lib/python2.5/site-packages/numpy/core/include >> -I/usr/local/include -I/usr/include -I. >> -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 >> -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 >> -I/usr/include/python2.5 -c src/ft2font.cpp -o >> build/temp.linux-x86_64-2.5/src/ft2font.o >> cc1plus: warning: command line option "-Wstrict-prototypes" is valid >> for Ada/C/ObjC but not for C++ >> In file included from ./CXX/Extensions.hxx:37, >> from src/ft2font.h:4, >> from src/ft2font.cpp:1: >> ./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory > > You seem not to have the development package of python installed. > Try "sudo apt-get install python-dev". It looks like you are need to install libfreetype6-dev. Any time you see missing .h files in your output, it means you need to install the development headers for that package. Darren |
|
From: LUK S. <luk...@gm...> - 2010-04-19 08:30:47
|
On 04/19/2010 01:52 PM, C M wrote: > My goal is to just get the lastest svn version of matplotlib, or, if > not that, just the 0.99 version, up and working on my Linux (Intrepid > Ibex) computer. I checked it matplotlib out from svn fine, and then, > as per the webpage, did: > >> cd matplotlib >> python setup.py install > > and that resulted in a very large amount of errors. I'll post them at > the bottom of this message, since there are many lines. > > I previously had 0.98.x installed, via the Ubuntu repositories, but I > have uninstalled it. My version is: > Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008 > x86_64 GNU/Linux > > Any help is appreciated. Thank you, > Che > > Errors (starting from a few lines before): > > creating build/temp.linux-x86_64-2.5/src > creating build/temp.linux-x86_64-2.5/CXX > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -DPYCXX_ISO_CPP_LIB=1 > -I/usr/lib/python2.5/site-packages/numpy/core/include > -I/usr/local/include -I/usr/include -I. > -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 > -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 > -I/usr/include/python2.5 -c src/ft2font.cpp -o > build/temp.linux-x86_64-2.5/src/ft2font.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for Ada/C/ObjC but not for C++ > In file included from ./CXX/Extensions.hxx:37, > from src/ft2font.h:4, > from src/ft2font.cpp:1: > ./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory You seem not to have the development package of python installed. Try "sudo apt-get install python-dev". Regards, ST -- |
|
From: C M <cmp...@gm...> - 2010-04-19 05:52:35
|
My goal is to just get the lastest svn version of matplotlib, or, if
not that, just the 0.99 version, up and working on my Linux (Intrepid
Ibex) computer. I checked it matplotlib out from svn fine, and then,
as per the webpage, did:
> cd matplotlib
> python setup.py install
and that resulted in a very large amount of errors. I'll post them at
the bottom of this message, since there are many lines.
I previously had 0.98.x installed, via the Ubuntu repositories, but I
have uninstalled it. My version is:
Linux ubuntu 2.6.27-7-generic #1 SMP Fri Oct 24 06:40:41 UTC 2008
x86_64 GNU/Linux
Any help is appreciated. Thank you,
Che
Errors (starting from a few lines before):
creating build/temp.linux-x86_64-2.5/src
creating build/temp.linux-x86_64-2.5/CXX
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1
-I/usr/lib/python2.5/site-packages/numpy/core/include
-I/usr/local/include -I/usr/include -I.
-I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2
-I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2
-I/usr/include/python2.5 -c src/ft2font.cpp -o
build/temp.linux-x86_64-2.5/src/ft2font.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for Ada/C/ObjC but not for C++
In file included from ./CXX/Extensions.hxx:37,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
./CXX/WrapPython.h:58:20: error: Python.h: No such file or directory
In file included from src/ft2font.cpp:1:
src/ft2font.h:13:22: error: ft2build.h: No such file or directory
src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
from src/ft2font.cpp:5:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:100:2:
error: #error Must use Python with unicode enabled.
In file included from ./CXX/Python3/Exception.hxx:45,
from ./CXX/Python3/Objects.hxx:45,
from ./CXX/Python3/Extensions.hxx:52,
from ./CXX/Extensions.hxx:42,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
./CXX/Python3/IndirectPythonInterface.hxx:50: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:51: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:52: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:53: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:55: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:56: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:57: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:58: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:59: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:60: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:61: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:62: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:63: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:64: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:65: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:66: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:67: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:68: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:69: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:70: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:71: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:72: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:73: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:74: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:75: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:76: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:81: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:83: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:84: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:85: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:86: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:91: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:93: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:94: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:99: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:100: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:100: error: ‘o’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:102: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:103: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:103: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:105: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:106: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:106: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:108: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:109: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:109: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:111: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:112: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:112: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:114: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:115: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:115: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:117: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:118: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:118: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:120: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:121: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:121: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:123: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:124: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:124: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:126: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:127: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:127: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:129: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:130: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:130: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:132: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:133: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:133: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:135: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:136: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:136: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:138: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:139: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:139: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:141: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:142: error: redefinition of
‘bool Py::_List_Check’
./CXX/Python3/IndirectPythonInterface.hxx:100: error: ‘bool
Py::_List_Check’ previously defined here
./CXX/Python3/IndirectPythonInterface.hxx:142: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:142: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:144: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:145: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:145: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:147: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:148: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:148: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:150: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:151: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:151: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:153: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:154: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:154: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:156: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:157: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:157: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:159: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:160: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:160: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:162: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:163: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:163: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:165: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:166: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:166: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:168: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:169: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:169: error: ‘v’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:171: error: expected
constructor, destructor, or type conversion before ‘*’ token
./CXX/Python3/IndirectPythonInterface.hxx:172: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:172: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:182: error: variable or
field ‘_XINCREF’ declared void
./CXX/Python3/IndirectPythonInterface.hxx:182: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:182: error: ‘op’ was not
declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:183: error: variable or
field ‘_XDECREF’ declared void
./CXX/Python3/IndirectPythonInterface.hxx:183: error: ‘PyObject’ was
not declared in this scope
./CXX/Python3/IndirectPythonInterface.hxx:183: error: ‘op’ was not
declared in this scope
In file included from ./CXX/Python3/Objects.hxx:45,
from ./CXX/Python3/Extensions.hxx:52,
from ./CXX/Extensions.hxx:42,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
./CXX/Python3/Exception.hxx:71: error: expected `)' before ‘*’ token
./CXX/Python3/Exception.hxx:76: error: expected `)' before ‘*’ token
./CXX/Python3/Exception.hxx: In constructor
‘Py::Exception::Exception(const std::string&)’:
./CXX/Python3/Exception.hxx:68: error: ‘_Exc_RuntimeError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:68: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In member function ‘void Py::Exception::clear()’:
./CXX/Python3/Exception.hxx:81: error: ‘PyErr_Clear’ was not declared
in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::TypeError::TypeError(const std::string&)’:
./CXX/Python3/Exception.hxx:123: error: ‘_Exc_TypeError’ is not a member of ‘Py’
./CXX/Python3/Exception.hxx:123: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::IndexError::IndexError(const std::string&)’:
./CXX/Python3/Exception.hxx:133: error: ‘_Exc_IndexError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:133: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::AttributeError::AttributeError(const std::string&)’:
./CXX/Python3/Exception.hxx:143: error: ‘_Exc_AttributeError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:143: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::NameError::NameError(const std::string&)’:
./CXX/Python3/Exception.hxx:153: error: ‘_Exc_NameError’ is not a member of ‘Py’
./CXX/Python3/Exception.hxx:153: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::RuntimeError::RuntimeError(const std::string&)’:
./CXX/Python3/Exception.hxx:163: error: ‘_Exc_RuntimeError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:163: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::SystemError::SystemError(const std::string&)’:
./CXX/Python3/Exception.hxx:173: error: ‘_Exc_SystemError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:173: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::KeyError::KeyError(const std::string&)’:
./CXX/Python3/Exception.hxx:183: error: ‘_Exc_KeyError’ is not a member of ‘Py’
./CXX/Python3/Exception.hxx:183: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::ValueError::ValueError(const std::string&)’:
./CXX/Python3/Exception.hxx:194: error: ‘_Exc_ValueError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:194: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::OverflowError::OverflowError(const std::string&)’:
./CXX/Python3/Exception.hxx:204: error: ‘_Exc_OverflowError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:204: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::ZeroDivisionError::ZeroDivisionError(const std::string&)’:
./CXX/Python3/Exception.hxx:214: error: ‘_Exc_ZeroDivisionError’ is
not a member of ‘Py’
./CXX/Python3/Exception.hxx:214: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::FloatingPointError::FloatingPointError(const std::string&)’:
./CXX/Python3/Exception.hxx:224: error: ‘_Exc_FloatingPointError’ is
not a member of ‘Py’
./CXX/Python3/Exception.hxx:224: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::MemoryError::MemoryError(const std::string&)’:
./CXX/Python3/Exception.hxx:234: error: ‘_Exc_MemoryError’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:234: error: ‘PyErr_SetString’ was not
declared in this scope
./CXX/Python3/Exception.hxx: In constructor
‘Py::SystemExit::SystemExit(const std::string&)’:
./CXX/Python3/Exception.hxx:244: error: ‘_Exc_SystemExit’ is not a
member of ‘Py’
./CXX/Python3/Exception.hxx:244: error: ‘PyErr_SetString’ was not
declared in this scope
In file included from ./CXX/Python3/Extensions.hxx:52,
from ./CXX/Extensions.hxx:42,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
./CXX/Python3/Objects.hxx: At global scope:
./CXX/Python3/Objects.hxx:143: error: ISO C++ forbids declaration of
‘PyObject’ with no type
./CXX/Python3/Objects.hxx:143: error: expected ‘;’ before ‘*’ token
./CXX/Python3/Objects.hxx:146: error: ‘PyObject’ has not been declared
./CXX/Python3/Objects.hxx:167: error: expected `)' before ‘*’ token
src/ft2font.cpp:2010: error: expected `}' at end of input
./CXX/Python3/Objects.hxx: In member function ‘void
Py::Object::set(int*, bool)’:
./CXX/Python3/Objects.hxx:149: error: ‘p’ was not declared in this scope
./CXX/Python3/Objects.hxx:152: error: ‘_XINCREF’ is not a member of ‘Py’
./CXX/Python3/Objects.hxx: In member function ‘void Py::Object::release()’:
./CXX/Python3/Objects.hxx:159: error: ‘_XDECREF’ is not a member of ‘Py’
./CXX/Python3/Objects.hxx:159: error: ‘p’ was not declared in this scope
./CXX/Python3/Objects.hxx: At global scope:
./CXX/Python3/Objects.hxx:161: error: expected unqualified-id at end of input
./CXX/Python3/Objects.hxx:161: error: expected `}' at end of input
error: command 'gcc' failed with exit status 1
|
|
From: william r. <wil...@gm...> - 2010-04-19 03:33:35
|
Hi! I am using matplotlib 0.99.0 under windows xp. I tried the following: ax.text(.96,.80,r'$P \perp Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') and get the following error: (However, in figure labels, symbols using mathtext, such as theta seem to work fine...) Thanks, William TypeError: cannot return std::string from Unicode object File "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", line 301, in <module> film110() File "C:\mytripleaxisproject\trunk\eclipse\src\utilities\bfo_film_fig2.py", line 157, in film110 plt.show() File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", line 63, in show manager.window.show() File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4.py", line 168, in resizeEvent self.draw() File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_qt4agg.py", line 130, in draw FigureCanvasAgg.draw(self) File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 314, in draw self.figure.draw(self.renderer) File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 774, in draw for a in self.axes: a.draw(renderer) File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1721, in draw a.draw(renderer) File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 515, in draw bbox, info = self._get_layout(renderer) File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 279, in _get_layout clean_line, self._fontproperties, ismath=ismath) File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 156, in get_text_width_height_descent self.mathtext_parser.parse(s, self.dpi, prop) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 2810, in parse box = self._parser.parse(s, font_output, fontsize, dpi) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 2259, in parse self._expression.parseString(s) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 1048, in parseString loc, tokens = self._parse( instring, 0 ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, in parseImpl return self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2307, in parseImpl loc, exprtokens = e._parse( instring, loc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2672, in parseImpl loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2307, in parseImpl loc, exprtokens = e._parse( instring, loc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2756, in parseImpl loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2714, in parseImpl loc, tmptokens = self.expr._parse( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2373, in parseImpl return maxMatchExp._parse( instring, loc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, in parseImpl return self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2416, in parseImpl ret = e._parse( instring, loc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, in parseImpl return self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, in parseImpl return self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2416, in parseImpl ret = e._parse( instring, loc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2293, in parseImpl loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2756, in parseImpl loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2559, in parseImpl return self.expr._parse( instring, loc, doActions, callPreParse=False ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2373, in parseImpl return maxMatchExp._parse( instring, loc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 924, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 2416, in parseImpl ret = e._parse( instring, loc, doActions ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 981, in _parseCache value = self._parseNoCache( instring, loc, doActions, callPreParse ) File "C:\Python25\Lib\site-packages\matplotlib\pyparsing.py", line 950, in _parseNoCache tokens = fn( instring, tokensStart, retTokens ) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 2374, in symbol char = Char(c, self.get_state()) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 1264, in __init__ self._update_metrics() File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 1271, in _update_metrics self.font, self.font_class, self.c, self.fontsize, self.dpi) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 446, in get_metrics info = self._get_info(font, font_class, sym, fontsize, dpi) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 579, in _get_info self._get_glyph(fontname, font_class, sym, fontsize) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 697, in _get_glyph fontname, font_class, sym, fontsize) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 827, in _get_glyph cached_font = self._get_font(new_fontname) File "C:\Python25\Lib\site-packages\matplotlib\mathtext.py", line 560, in _get_font font = FT2Font(basename) |
|
From: Gökhan S. <gok...@gm...> - 2010-04-18 16:55:45
|
On Sun, Apr 18, 2010 at 11:47 AM, Darren Dale <dsd...@gm...> wrote: > On Tue, Apr 13, 2010 at 8:14 PM, Gökhan Sever <gok...@gm...> > wrote: > > Hello, > > > > Could someone confirm me if there is any malfunctioning using these > simple > > figure functions? > > > > plt.figure(figsize=(2,3)) > > > > plt.figure(figsize=(5,6)) > > > > plt.figure(figsize=(9,15)) > > > > plt.figure(figsize=(19,5)) > > > > For some reason I can't get Qt4Agg creating last two figures in specified > > sizes. (WXAgg works fine.) > > > > matplotlib.__version__ > > '1.0.svn' > > > > matplotlib.__revision__ > > '$Revision: 8226 $' > > > > from PyQt4 import QtCore > > QtCore.PYQT_VERSION_STR > > '4.7' > > I can reproduce this behavior with a pure pyqt4 example with no mpl > code, see below. I asked for advice on the pyqt mailing list. > > import sys > from PyQt4 import QtCore, QtGui > > class Test(QtGui.QWidget): > > def __init__(self, width, height): > QtGui.QWidget.__init__(self) > #self.setSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) > print 'Central widget should have width=%d, height=%d' %(width, > height) > self._width = width > self._height = height > > def sizeHint(self): > return QtCore.QSize(self._width, self._height) > > app = QtGui.QApplication([]) > m = QtGui.QMainWindow() > c = Test(1000, 700) > m.setCentralWidget(c) > m.show() > s = c.size() > print 'but central widget has width=%d, height=%d'% (s.width(), s.height()) > sys.exit(app.exec_()) > Same here with your sample: Central widget should have width=1000, height=700 but central widget has width=960, height=600 I resorted to WXAgg for the time being. Waiting for some updates till I hear a resolution. The annoying part is when I created a plot using specified width and height Qt4Agg doesn't follow these dimensions as in this case and resulting savefig(file.pdf) produces wrongly sized file unless I manually extend the figure area and re-issue a savefig afterwards. -- Gökhan |