SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(2)
2
(4)
3
(21)
4
(4)
5
(13)
6
(28)
7
(11)
8
(2)
9
10
(11)
11
(5)
12
13
(5)
14
(25)
15
(4)
16
(1)
17
(7)
18
(15)
19
(21)
20
(27)
21
(11)
22
(1)
23
(1)
24
(3)
25
(9)
26
(13)
27
(19)
28
(11)
29
(4)
30
(4)
31
(11)





Showing 5 results of 5

From: Alan G I. <ai...@am...> - 2005年10月11日 15:48:27
On 2005年10月11日, Steve Schmerler apparently wrote: 
> I did some plots (MPL 0.82 on Linux), exported them as 
> .eps \includegraphics'ed them in TeX (latex -> dvipdf). 
> Some plot labels included r'$\tau$' and things like that. 
> Unfortunately when I print my document the TeX symbols are 
> missing. Moreover the x-axis tick numbers as well as the 
> xlabel are also not there. I know other people who also 
> had problems with missing or screwed up symbols when 
> printing out .pdfs (unrelated to TeX, MPL). Is there 
> anything I can do about that from the MPL side? 
1. If you view the EPS, say in GhostScript, is everything 
 there?
2. What is the bounding box (if you look in the EPS file)? 
 Is it all inside the page dimension set in your dvipdfm 
 config file?
Cheers,
Alan Isaac
From: Steve S. <el...@gm...> - 2005年10月11日 11:35:41
Hi
I did some plots (MPL 0.82 on Linux), exported them as .eps 
\includegraphics'ed them in TeX (latex -> dvipdf).
Some plot labels included r'$\tau$' and things like that. Unfortunately 
when I print my document the TeX symbols are missing. Moreover the 
x-axis tick numbers as well as the xlabel are also not there. I know 
other people who also had problems with missing or screwed up symbols 
when printing out .pdfs (unrelated to TeX, MPL). Is there anything I can 
do about that from the MPL side?
cheers,
steve
From: Luigi P. <lu...@mi...> - 2005年10月11日 10:25:37
Hi all!
I've just installed matplotlib on my workstation (without Numeric, only 
numarray). Trying to run the image plot examples, I get this error:
Exception in Tkinter callback
Traceback (most recent call last):
 File "<mypath>/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__
 return self.func(*args)
 File 
"<mypath>/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py", 
line 148, in resize
 File 
"<mypath>/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py", 
line 151, in draw
 File 
"<mypath>/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py", 
line 382, in draw
 File "<mypath>/lib/python2.3/site-packages/matplotlib/figure.py", 
line 520, in draw
 File "<mypath>/lib/python2.3/site-packages/matplotlib/axes.py", line 
1373, in draw
 File "<mypath>/lib/python2.3/site-packages/matplotlib/image.py", line 
205, in draw
 File "<mypath>/lib/python2.3/site-packages/matplotlib/image.py", line 
127, in make_image
ValueError: Array must be rank 2 or 3 of doubles
What's the problem?
Tanks in advance.
Luigi
From: Alexander B. <ale...@gm...> - 2005年10月11日 08:12:00
On 10/10/05, Nadia Dencheva <den...@st...> wrote:
>
> Alex,
>
> It would be helpful if you post your basedir (from the beginning of
> setupext.py),
basedir =3D {
'win32' : ['win32_static',],
'linux2' : ['/usr/local', '/usr',],
'linux' : ['/usr/local', '/usr',],
# Charles Moad recommends not putting in /usr/X11R6 for darwin
# because freetype in this dir is too old for mpl
'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
'/usr', '/sw'],
'freebsd4' : ['/usr/local', '/usr'],
'freebsd5' : ['/usr/local', '/usr'],
'freebsd6' : ['/usr/local', '/usr'],
'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',],
}
the output of the build command (maybe just the lines for nc_image)
The lines containing -lpng:
c++ -pthread -shared build/temp.linux-i686-2.3/src/_gtkagg.o
build/temp.linux-i686-2.3/src/mplutils.o
build/temp.linux-i686-2.3/src/_transforms.o
build/temp.linux-i686-2.3/CXX/cxx_extensions.o
build/temp.linux-i686-2.3/CXX/IndirectPythonInterface.o
build/temp.linux-i686-2.3/CXX/cxxsupport.o
build/temp.linux-i686-2.3/CXX/cxxextensions.o
-L/usr/local/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/lib
-L/usr/lib -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -lgobject-2.0=
-
lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -
lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -
lglib-2.0 -o build/lib.linux-i686-2.3/matplotlib/backends/_gtkagg.so
-Wl,--export-dynamic
building 'matplotlib.backends._tkagg' extension
...
c++ -pthread -shared build/temp.linux-i686-2.3/src/_tkagg.o
build/temp.linux-i686-2.3/CXX/cxx_extensions.o
build/temp.linux-i686-2.3/CXX/IndirectPythonInterface.o
build/temp.linux-i686-2.3/CXX/cxxsupport.o
build/temp.linux-i686-2.3/CXX/cxxextensions.o
-L/usr/share/tcl8.4/../ -L/usr/share/tk8.4/../ -L/usr/local/lib -L/usr/lib
-L/usr/local/lib -L/usr/lib -ltk8.4 -ltcl8.4 -lpng -lz -lstdc++ -lm
-lfreetype -lz -lstdc++ -lm -o build/lib.linux-i686-2.3
/matplotlib/backends/_tkagg.so
building 'matplotlib.backends._nc_backend_agg' extension
...
c++ -pthread -shared build/temp.linux-i686-2.3/agg23/src/agg_trans_affine.o
build/temp.linux-i686-2.3/agg23/src/agg_path_storage.o build/temp.linux-
i686-2.3/agg23/src/agg_bezier_arc.o
build/temp.linux-i686-2.3/agg23/src/agg_curves.o
build/temp.linux-i686-2.3/agg23/src/agg_vcgen_dash.o build/temp.linux-
i686-2.3/agg23/src/agg_vcgen_stroke.o
build/temp.linux-i686-2.3/agg23/src/agg_rasterizer_scanline_aa.o
build/temp.linux-i686-2.3/agg23/src/agg_image_filters.o build/temp.linux-
i686-2.3/src/_image.o build/temp.linux-i686-2.3/src/ft2font.o
build/temp.linux-i686-2.3/src/mplutils.o
build/temp.linux-i686-2.3/CXX/cxx_extensions.o
build/temp.linux-i686-2.3/CXX/IndirectPythonInterface.o build/temp.linux-
i686-2.3/CXX/cxxsupport.o build/temp.linux-i686-2.3/CXX/cxxextensions.o
build/temp.linux-i686-2.3/src/_nc_backend_agg.o -L/usr/local/lib -L/usr/lib
-L/usr/local/lib -L/usr/lib -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++
-lm -o build/lib.linux-i686-2.3/matplotlib/backends/_nc_backend_agg.so
building 'matplotlib.ft2font' extension
...
c++ -pthread -shared build/temp.linux-i686-2.3/src/_nc_image.o
build/temp.linux-i686-2.3/src/mplutils.o
build/temp.linux-i686-2.3/agg23/src/agg_trans_affine.o
build/temp.linux-i686-2.3/agg23/src/agg_path_storage.o build/temp.linux-
i686-2.3/agg23/src/agg_rasterizer_scanline_aa.o
build/temp.linux-i686-2.3/agg23/src/agg_image_filters.o
build/temp.linux-i686-2.3/agg23/src/agg_bezier_arc.o build/temp.linux-
i686-2.3/CXX/cxx_extensions.o
build/temp.linux-i686-2.3/CXX/IndirectPythonInterface.o
build/temp.linux-i686-2.3/CXX/cxxsupport.o
build/temp.linux-i686-2.3/CXX/cxxextensions.o
-L/usr/local/lib -L/usr/lib -lpng -lz -lstdc++ -lm -o build/lib.linux-
i686-2.3/matplotlib/_nc_image.so
building 'matplotlib._nc_cntr' extension
None of these .so files have libpng linked in. I'll include the output of
ldd for the last one:
~/incoming/matplotlib-0.84 |10> ldd build/lib.linux-i686-2.3
/matplotlib/_nc_image.so
libz.so.1 =3D> /usr/lib/libz.so.1 (0x0017b000)
libstdc++.so.6 =3D> /usr/lib/libstdc++.so.6 (0x0075e000)
libm.so.6 =3D> /lib/tls/libm.so.6 (0x005fd000)
libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x00111000)
libpthread.so.0 =3D> /lib/tls/libpthread.so.0 (0x006f9000)
libc.so.6 =3D> /lib/tls/libc.so.6 (0x00e29000)
/lib/ld-linux.so.2 (0x00139000)
> and
> the operating
> system you are using. This will show whether python is looking for
> libpng in
> the correct directory.
I'm using Fedora core 3 as user (meaning I have installed Numeric locally).
The libpng.so file is where you'd
expect it to be, in /usr/lib. This is seriously strange, I didn't get any
errors either, just a bunch of warnings.
I'll include them as well, though I doubt they'll be useful:
~/incoming/matplotlib-0.84 |6> python setup.py build > buildlog
In file included from /usr/include/python2.3/Python.h:8,
from ./CXX/Objects.hxx:9,
from ./CXX/Extensions.hxx:19,
from src/_transforms.h:12,
from src/_nc_transforms.cpp:2:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/os_defines.h:39,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/c++config.h:35,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/function=
al:54,
from src/_nc_transforms.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the previou=
s
definition
In file included from /usr/include/python2.3/Python.h:8,
from /usr/include/pygtk-2.0/pygobject.h:5,
from src/_gtkagg.cpp:10:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from /usr/include/string.h:26,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/cstring:=
51,
from src/_gtkagg.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the previou=
s
definition
In file included from /usr/include/python2.3/Python.h:8,
from ./CXX/Objects.hxx:9,
from ./CXX/Extensions.hxx:19,
from src/_transforms.h:12,
from src/_transforms.cpp:2:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/os_defines.h:39,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/c++config.h:35,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/function=
al:54,
from src/_transforms.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the previou=
s
definition
In file included from /usr/include/python2.3/Python.h:8,
from src/_image.cpp:7:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/os_defines.h:39,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/c++config.h:35,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream=
:44,
from src/_image.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the previou=
s
definition
In file included from /usr/include/python2.3/Python.h:8,
from ./CXX/Objects.hxx:9,
from ./CXX/Extensions.hxx:19,
from src/ft2font.h:18,
from src/_nc_backend_agg.cpp:18:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/os_defines.h:39,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/c++config.h:35,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream=
:44,
from src/_nc_backend_agg.cpp:4:
/usr/include/features.h:150:1: warning: this is the location of the previou=
s
definition
In file included from /usr/include/python2.3/Python.h:8,
from ./CXX/Objects.hxx:9,
from ./CXX/Extensions.hxx:19,
from src/ft2font.h:18,
from src/ft2font.cpp:2:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/os_defines.h:39,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/c++config.h:35,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iosfwd:4=
5,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:44,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/istream:=
45,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/sstream:=
45,
from src/ft2font.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the previou=
s
definition
In file included from /usr/include/python2.3/Python.h:8,
from src/_nc_image.cpp:7:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/os_defines.h:39,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/i386-red=
hat-linux/bits/c++config.h:35,
from
/usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream=
:44,
from src/_nc_image.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the previou=
s
definition
74.056u 3.357s 1:17.71 99.6% 0+0k 0+0io 75pf+0w
--
Alex Borghgraef
From: Chris B. <Chr...@no...> - 2005年10月11日 05:10:43
Just to add a few other comments about Python vs. Matlab.
Matlab strengths:
Very complete numerical library that is "just there", well integated and 
documented. With Python, you can find most of the same functionality, 
but it's a bit scattered, different libas aren't compatible with each 
other, etc. The SciPy project is heloping this a lot, but it's really 
not there yet.
Integrated plotting. Matplotlib has gone a long way to address this 
weakness for Python but it's only 2-d, etc.
Python+NumPy strengths:
Much better language: Better OO, more powerful flexible etc, etc, etc.
Much wider library support for things other than numerical work. 
Everything from text processing, full featured GUIs to Web developoment, 
etc. Also a huge number of C and C++ libs have been wrapped, for 
everything from GIS work to image processing.
Far more options for a full featured GUI.
NumPy supports wider variety of data types, integer types, etc.
Better support for arrays with more that 2 dimensions.
I like the NumPy array syntax/style better: elementwise is default, 
Array Broadcasting---yeah!
Indexing from 0 and slicing sytax end up being much cleaner:
 concatenate(a[a:b] + a [b:c]) = a ... it saves a lot of adding one, 
and checking the end cases.
More options for optimizing code, from simple stuff like in place 
operators: multiply(a,b,a) to SciPy.weave to Pyrex, to boost.
Easy ways to wrap exisiting code: SWIG, f2Py, etc.
Open source and platform independent.
Easier to create stand-alone appliations, and on ANY platfrom.
Do you need more?? Can you tell which one I use all the time these days? 
And I was a major fan of MATLAB before I discovered Python.
In short, I think Python+NumPy is inherently far supperior a developmet 
environment. The only thing is lacks is the clean integation and 
packaging that is often superior with comercial apps. That isn't a small 
issue. I haven't suggested Python to a few of my coleagues that use 
MATLAB for numerical prototyping. For the work they do, the extra effort 
to find out how to do what you need to do for Python is probably not 
worth it, from selecting a development environment, to docs, etc. Now 
that MPL is in pretty good shape, I'm almost ready to recomend a switch.
I do think that if you do any develpment beyond simnple numerical 
prototyping, you're better off with Python.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Showing 5 results of 5

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /