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





Showing 15 results of 15

From: Jean-Baptiste C. <jc...@de...> - 2004年05月13日 15:24:47
S=E6ll !
I was simply planning to be able to move between the default positions 'upp=
er right', 'upper left', etc
But I believe I can use _offset.
However it did not produce much effect
I have defined the legend the following way:
canvas.leg=3DFigure.legend(canvas.figure,tuple([i[1] for i in d]),tuple([i[=
0] for i in d]),'best')
And then when I toggle a button I apply the following move with the canvas =
object, which is just a test offset
 def toggle_legend(self, event):
 """ Toggle the label in the legend button=20
 between Upper Right and Upper Left """
 =20
 if self.Legend_button.get_active()=3D=3D1:
 self.Legend_button.set_label("Upper Right")
 else:
 self.Legend_button.set_label("Upper Left")
 self.leg._offset(0.1,0.56)
 self.draw()
 =20
 return
When I toggle the button, the label changes, but the legend is unmoved.
Am I missing something ?=20
Takk
Jean-Baptiste
On 2004年5月13日 05:20:28 -0500
John Hunter <jdh...@ni...> wrote:
> >>>>> "Jean-Baptiste" =3D=3D Jean-Baptiste Cazier <jc...@de...> wri=
tes:
>=20
> Jean-Baptiste> S_ll ! I would like to be able to move my
> Jean-Baptiste> Figure.legend Because the optimal position of the
> Jean-Baptiste> legend on my figure is not always the same, I added
> Jean-Baptiste> a button to the navigation toolbar to give the suer
> Jean-Baptiste> a chance to choose the position of the legend I
> Jean-Baptiste> knwo that I can get a handle on my first legend
> Jean-Baptiste> drawing, but how can I just modify its location ?
> Jean-Baptiste> Is there a move_location method for the
> Jean-Baptiste> Figure.legend ?
>=20
> There is currently no "move to" location, but there is an offset
> method where you can supply a deltxa, deltay in relative sizes, in
> your case fractions of the figure width and height. So if you wanted
> to move the legend 5% of the figure width to the right and 10% of the
> figure height up, you can call
>=20
> leg._offset(0.05, 0.10)
>=20
> The leading underscore means that this method was intended for
> internal use, and may change in future releases, but you can try it
> and see if it works for you. If it does, I can probably make it
> a public method for the next release.
>=20
> As always you'll need to call canvas.draw after setting the new legend
> location.
> =20
>=20
> JDH
--=20
-----------------------------
Jea...@de...
Department of Statistics
deCODE genetics Sturlugata,8
570 2993 101 Reykjav=EDk
From: John H. <jdh...@ac...> - 2004年05月13日 13:38:01
>>>>> "Karthikesh" == Karthikesh Raju <ka...@ja...> writes:
 Karthikesh> Hi John, Looks like in the previous mail, i had set
 Karthikesh> the build numarray on, now i removed that flag, and
 Karthikesh> the installation went on smooth, and i could
 Karthikesh> 1) pygtk, 2) gtk, and 3) matplotlib
 Karthikesh> things went smooth so far, and i run most of the
 Karthikesh> examples bearing some. Now i will try to set things
 Karthikesh> to auto slowly and try the rest.
Great! Start with agg, then image, then gtkagg, and that may be all
you need. Unless you want to use matplotlib interactively from the
shell, in which case tkagg is your best bet.
 Karthikesh> BTW: the following were the developmental packages
 Karthikesh> that i needed here: (At work our sys's have not
 Karthikesh> installed any of the developmental packages)
Thanks for the list! I'll put it on the web site.
JDH
From: Karthikesh R. <ka...@ja...> - 2004年05月13日 13:34:09
Hi John,
Looks like in the previous mail, i had set the build numarray on, now i
removed that flag, and the installation went on smooth, and i could
1) pygtk,
2) gtk, and
3) matplotlib
things went smooth so far, and i run most of the examples bearing some.
Now i will try to set things to auto slowly and try the rest.
BTW: the following were the developmental packages that i needed here:
(At work our sys's have not installed any of the developmental packages)
audiofile-devel-0.2.3-6.i386.rpm gtk2-devel-2.2.1-4.i386.rpm
esound-devel-0.2.28-4.i386.rpm gtk+-devel-1.2.10-25.i386.rpm
freetype-2.1.3-6.i386.rpm imlib-devel-1.9.13-12.i386.rpm
freetype-devel-2.1.3-6.i386.rpm ORBit-devel-0.5.17-7.i386.rpm
freetype-utils-2.1.3-6.i386.rpm pygtk2-1.99.16-8rh9.i386.rpm
glib-devel-1.2.10-10.i386.rpm
pygtk2-devel-1.99.16-8rh9.i386.rpm
gnome-libs-devel-1.4.1.2.90-32.i386.rpm
pygtk2-libglade-1.99.16-8rh9.i386.rpm
Many had circular dependences, and hence the requirement.
Thankx,
warm regards
karthik
-----------------------------------------------------------------------
Karthikesh Raju,		 email: ka...@ja...
Researcher,			 http://www.cis.hut.fi/karthik
Helsinki University of Technology, Tel: +358-9-451 5389
Laboratory of Comp. & Info. Sc., Fax: +358-9-451 3277
Department of Computer Sc.,
P.O Box 5400, FIN 02015 HUT,
Espoo, FINLAND
-----------------------------------------------------------------------
On 2004年5月13日, John Hunter wrote:
> >>>>> "Karthikesh" == Karthikesh Raju <ka...@ja...> writes:
>
> Since you are facing multiple issues, let's try and get the simplest
> build working and then add stuff in. First though, it would be
> helpful if you told me what devel rpms you needed to install so I
> recommend these on the web page to other users. BTW, the two pages
> most relevant for you with installation information are
> http://matplotlib.sf.net/installing.html and
> http://matplotlib.sf.net/backends.html. Make sure you give these a
> good read.
>
> From reading your email, I see that you are installing everything to
> your home dir, is that right?
>
> Step 1: start with a clean matplotlib src tree. I don't want to try
> and work with the one where you have hardcoded information in the
> code because then I don't know what is going on. Just untar the
> tar.gz file in a new dir and start cleanly
>
> Step 2: Edit setup.py and turn all the BUILD flags off, except for
> BUILD_FT2FONT. Let's try and get a working base install and then deal
> with getting the extension code compiled.
>
> Step 3: Edit setupext.py and add any non-standard base dirs in which
> you have installed stuff (eg /home/you/usr, /home/you/usr/local') to
> the basedirs dictionary at the top of that file. Your platform is
> linux2.
>
> Step 4: Install matplotlib with > python setup.py install
>
> Step 5: If the build doesn't finish cleanly (the only reason I can
> think it would fail is if you don't get ft2font built properly.
> This package requires lib freetype so make you have the freetype and
> freetype-devel libs installed. It also requires libz so make sure
> you have zlib and zlib-devel installed. If you have installed these
> to a nonstandard place, make sure you add the basedir to setupext
> basedirs.
>
> Step 6: OK, I'm assuming you have a clean install at this point. If
> you installed with a non-standard prefix, you need to set your
> MATPLOTLIBDATA environment variable. This data should point to the
> dir that contains, for example, all the Vera*.ttf files. Eg,
> /your/install/prefix/share/matplotlib. If you add this to your rc
> file, make sure you resource your rc or open a new shell.
>
> Step 7: At this point, if you have numarray and pygtk installed
> (1.99.16 or later), you should be able to import matplotlib. Open up
> python shell and make sure you can do
>
> >>> import pygtk
> >>> pygtk.require('2.0')
> >>> import gtk
> >>> import numarray
> >>> import matplotlib
>
> If not, let us know what error you are getting. You should now be
> able to run python simple_plot.py -dGTK
>
>
> Step 8: Edit setup.py and add the other build flags back in. You can
> set the ones you want to build to 'auto', which will try and build
> an extension if the python dependencies are found. If you still
> have problems with arrayobject.h, let me know. You can add the
> include path to that file in the build_image method in setupext.py
> by doing
>
> module.include_dirs.append('/your/path/to/numerix/headers')
>
> ie, /home/karthik/usr/include/python/numarray
>
>
> We do want to improve the build process for people who have stuff in
> non-default locations, and it would be very helpful for us if you tell
> us explicitly what you had to add and change in the steps above so we
> can incorporate as much as possible into the default.
>
> Good luck!
> JDH
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: SourceForge.net Broadband
> Sign-up now for SourceForge Broadband and get the fastest
> 6.0/768 connection for only 19ドル.95/mo for the first 3 months!
> http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: John H. <jdh...@ac...> - 2004年05月13日 13:15:14
>>>>> "Karthikesh" == Karthikesh Raju <ka...@ja...> writes:
 Karthikesh> Ofcourse, numarray/arrayobject.h is at
 Karthikesh> /home/karthik/usr/include/python/numarray
 Karthikesh> What should i do next ?
Well it looks like you did not turn off the BUILD_IMAGE flag - set
BUILD_IMAGE = 0 and all the other BUILD_* flags except FT2FONT to 0.
The instructions for how to handle arrayobject are included later in
my instructions, but let's stay on target!
Note that I did give you the wrong path for arrayobject in my previous
email. When you get to step 8, I'm fairly certain you will need
 module.include_dirs.append('/home/karthik/usr/include/python')
JDH
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
 Nils> Now python setup.py build works fine. However
 Nils> python setup.py install
 Nils> as root failed with the following messages
 Nils> Xlib: connection to ":0.0" refused by server Xlib: No
 Nils> protocol specified
 Nils> Traceback (most recent call last): File "setup.py", line 75,
 Nils> in ? try: import gtk File
 Nils> "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py",
 Nils> line 43, in ? from _gtk import * RuntimeError: could not
 Nils> open display
 Nils> Any hint is appreciated
A couple of areas in the build process currently require an X
connection. This should probably be fixed. Are you building on a
local or remote machine?
 * If you are building on a remote machine, you need to set the
 display or use automatic X forwarding with ssh -X.
 * If you are building on a local machine, I think the problem is
 that when you go to install you are root and root doesn't have
 access to the display. You can verify this by trying to do
 root> xterm&
 and see if you can get a window to pop up. If not, you need to
 tell the windowing system to allow connections from root. 
Unix gurus please advise here. Something like
 user> python setup.py build
 user> xhost +
 user> su
 root> python setup.py install
 root> exit 
 user> xhost -
Let me know!
JDH
From: John H. <jdh...@ac...> - 2004年05月13日 12:54:34
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
 Nils> /home/nwagner> pkg-config --libs pygtk-2.0 -L/opt/gnome/lib
 Nils> -lgobject-2.0 -lglib-2.0
 Nils> /home/nwagner> pkg-config --libs gtk+-2.0
 Nils> -Wl,--export-dynamic -L/opt/gnome/lib -lgtk-x11-2.0
 Nils> -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0
 Nils> -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
 Nils> -lglib-2.0
Well that's interesting because pkg-config is doing it's job and
finding -L/opt/gnome/lib. You should verify that that flag is indeed
being added on the compile line that is failing but it should be so I
don't think this is your problem. In and case, could you post that
line and the first couple of error messages you get. 
Can anyone think of any reason why you would get a linker failure to
find -lgobject-2.0 if the compiler gets -L/opt/gnome/lib and the
following exist
 /opt/gnome/lib/libgobject-2.0.a
 /opt/gnome/lib/libgobject-2.0.la
 /opt/gnome/lib/libgobject-2.0.so
Is this some sun os weirdness?
JDH
Dear experts,
I have added the following entries in setupext.py (i.e. '/opt/gnome'
basedir = {
 'win32' : ['win32_static',],
 'linux2' : ['/usr','/opt/gnome',],
 'linux' : ['/usr','/opt/gnome',],
 'darwin' : ['/usr/local', '/sw'],
 'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',],
}
Now python setup.py build works fine.
However
python setup.py install
as root failed with the following messages
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Traceback (most recent call last):
 File "setup.py", line 75, in ?
 try: import gtk
 File "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 
43, in ?
 from _gtk import *
RuntimeError: could not open display
Any hint is appreciated
Nils
From: Karthikesh R. <ka...@ja...> - 2004年05月13日 12:48:25
Hi John,
Thankx for your reply. Well, i have tried the following:
step 1: done
step 2: done
step 3: i have added '/home/karthik/usr' to the basedir which is now
basedir = {
	 'win32' : bla bla
	 'linux2':
['/usr','/home/karthik/usr','/home/karthik/usr/include']
}
Now when i try installing matplotlib, i just get :
gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC
-I/usr/include -I/home/karthik/usr/include
-I/home/karthik/usr/include/python/numarray/include -Isrc -Iagg2/include
-I/usr/include/python2.2 -c src/_image.cpp -o
build/temp.linux-i686-2.2/_image.o -DNUMARRAY
src/_image.cpp:8:35: numarray/arrayobject.h: No such file or directory
src/_image.cpp: In function `PyObject* _image_fromarray(PyObject*,
PyObject*)':
src/_image.cpp:555: `PyArrayObject' undeclared (first use this function)
src/_image.cpp:555: (Each undeclared identifier is reported only once for
each
 function it appears in.)
src/_image.cpp:555: `A' undeclared (first use this function)
src/_image.cpp:561: parse error before `)' token
src/_image.cpp: In function `void init_image()':
src/_image.cpp:671: `import_array' undeclared (first use this function)
error: command 'gcc' failed with exit status 1
Ofcourse, numarray/arrayobject.h is at
/home/karthik/usr/include/python/numarray
What should i do next ?
With warm regards
karthik
PS: the array image was numeric
-----------------------------------------------------------------------
Karthikesh Raju,		 email: ka...@ja...
Researcher,			 http://www.cis.hut.fi/karthik
Helsinki University of Technology, Tel: +358-9-451 5389
Laboratory of Comp. & Info. Sc., Fax: +358-9-451 3277
Department of Computer Sc.,
P.O Box 5400, FIN 02015 HUT,
Espoo, FINLAND
-----------------------------------------------------------------------
On 2004年5月13日, John Hunter wrote:
> >>>>> "Karthikesh" == Karthikesh Raju <ka...@ja...> writes:
>
> Since you are facing multiple issues, let's try and get the simplest
> build working and then add stuff in. First though, it would be
> helpful if you told me what devel rpms you needed to install so I
> recommend these on the web page to other users. BTW, the two pages
> most relevant for you with installation information are
> http://matplotlib.sf.net/installing.html and
> http://matplotlib.sf.net/backends.html. Make sure you give these a
> good read.
>
> From reading your email, I see that you are installing everything to
> your home dir, is that right?
>
> Step 1: start with a clean matplotlib src tree. I don't want to try
> and work with the one where you have hardcoded information in the
> code because then I don't know what is going on. Just untar the
> tar.gz file in a new dir and start cleanly
>
> Step 2: Edit setup.py and turn all the BUILD flags off, except for
> BUILD_FT2FONT. Let's try and get a working base install and then deal
> with getting the extension code compiled.
>
> Step 3: Edit setupext.py and add any non-standard base dirs in which
> you have installed stuff (eg /home/you/usr, /home/you/usr/local') to
> the basedirs dictionary at the top of that file. Your platform is
> linux2.
>
> Step 4: Install matplotlib with > python setup.py install
>
> Step 5: If the build doesn't finish cleanly (the only reason I can
> think it would fail is if you don't get ft2font built properly.
> This package requires lib freetype so make you have the freetype and
> freetype-devel libs installed. It also requires libz so make sure
> you have zlib and zlib-devel installed. If you have installed these
> to a nonstandard place, make sure you add the basedir to setupext
> basedirs.
>
> Step 6: OK, I'm assuming you have a clean install at this point. If
> you installed with a non-standard prefix, you need to set your
> MATPLOTLIBDATA environment variable. This data should point to the
> dir that contains, for example, all the Vera*.ttf files. Eg,
> /your/install/prefix/share/matplotlib. If you add this to your rc
> file, make sure you resource your rc or open a new shell.
>
> Step 7: At this point, if you have numarray and pygtk installed
> (1.99.16 or later), you should be able to import matplotlib. Open up
> python shell and make sure you can do
>
> >>> import pygtk
> >>> pygtk.require('2.0')
> >>> import gtk
> >>> import numarray
> >>> import matplotlib
>
> If not, let us know what error you are getting. You should now be
> able to run python simple_plot.py -dGTK
>
>
> Step 8: Edit setup.py and add the other build flags back in. You can
> set the ones you want to build to 'auto', which will try and build
> an extension if the python dependencies are found. If you still
> have problems with arrayobject.h, let me know. You can add the
> include path to that file in the build_image method in setupext.py
> by doing
>
> module.include_dirs.append('/your/path/to/numerix/headers')
>
> ie, /home/karthik/usr/include/python/numarray
>
>
> We do want to improve the build process for people who have stuff in
> non-default locations, and it would be very helpful for us if you tell
> us explicitly what you had to add and change in the steps above so we
> can incorporate as much as possible into the default.
>
> Good luck!
> JDH
>
>
From: John H. <jdh...@ac...> - 2004年05月13日 12:06:05
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
 Nils> Dear experts, I am going to install matplotlib (latest cvs)
 Nils> on SuSe 9.1
 Nils> The result of python setup.py build is
 Nils> ld: cannot find -lgobject-2.0
 Nils> locate libgobject gives
 Nils> /opt/gnome/lib/libgobject-2.0.a
 Nils> /opt/gnome/lib/libgobject-2.0.la
 Nils> /opt/gnome/lib/libgobject-2.0.so
 Nils> /opt/gnome/lib/libgobject-2.0.so.0
 Nils> /opt/gnome/lib/libgobject-2.0.so.0.200.3
 Nils> What can I do to circumvent the problem ?
matplotlib uses pkg-config in setupext.py to locate the gtk libs,
flags, etc, and it's supposed to work, damn it! I am not sure why it
is failing in your case. I'd be interested to see your output of
 > pkg-config --libs pygtk-2.0
 > pkg-config --libs gtk+-2.0
I think you need to do 2 things
 * add /opt/gnome to your list of base dirs in setupext.py. Is your
 sys.platform 'sunos5'? If so, add it to the sunos5 list in the
 basedir dictionary. Also, please let me know what final settings
 work for you in that file and I can add it to the default config.
 * In setupext.py method add_pygtk_flags, paste in the line
 add_base_flags(module) 
 at or near the top of that function
Hope this helps,
JDH
From: Nils W. <nw...@me...> - 2004年05月13日 11:43:39
Dear experts,
I am going to install matplotlib (latest cvs) on SuSe 9.1
The result of python setup.py build is
ld: cannot find -lgobject-2.0
locate libgobject gives
/opt/gnome/lib/libgobject-2.0.a
/opt/gnome/lib/libgobject-2.0.la
/opt/gnome/lib/libgobject-2.0.so
/opt/gnome/lib/libgobject-2.0.so.0
/opt/gnome/lib/libgobject-2.0.so.0.200.3
What can I do to circumvent the problem ?
Thanks in advance.
 Nils
From: John H. <jdh...@ac...> - 2004年05月13日 11:16:31
>>>>> "Karthikesh" == Karthikesh Raju <ka...@ja...> writes:
Since you are facing multiple issues, let's try and get the simplest
build working and then add stuff in. First though, it would be
helpful if you told me what devel rpms you needed to install so I
recommend these on the web page to other users. BTW, the two pages
most relevant for you with installation information are
http://matplotlib.sf.net/installing.html and
http://matplotlib.sf.net/backends.html. Make sure you give these a
good read.
From reading your email, I see that you are installing everything to
your home dir, is that right?
Step 1: start with a clean matplotlib src tree. I don't want to try
 and work with the one where you have hardcoded information in the
 code because then I don't know what is going on. Just untar the
 tar.gz file in a new dir and start cleanly
Step 2: Edit setup.py and turn all the BUILD flags off, except for
 BUILD_FT2FONT. Let's try and get a working base install and then deal
 with getting the extension code compiled.
Step 3: Edit setupext.py and add any non-standard base dirs in which
 you have installed stuff (eg /home/you/usr, /home/you/usr/local') to
 the basedirs dictionary at the top of that file. Your platform is
 linux2.
Step 4: Install matplotlib with > python setup.py install
Step 5: If the build doesn't finish cleanly (the only reason I can
 think it would fail is if you don't get ft2font built properly.
 This package requires lib freetype so make you have the freetype and
 freetype-devel libs installed. It also requires libz so make sure
 you have zlib and zlib-devel installed. If you have installed these
 to a nonstandard place, make sure you add the basedir to setupext
 basedirs.
Step 6: OK, I'm assuming you have a clean install at this point. If
 you installed with a non-standard prefix, you need to set your
 MATPLOTLIBDATA environment variable. This data should point to the
 dir that contains, for example, all the Vera*.ttf files. Eg,
 /your/install/prefix/share/matplotlib. If you add this to your rc
 file, make sure you resource your rc or open a new shell.
Step 7: At this point, if you have numarray and pygtk installed
(1.99.16 or later), you should be able to import matplotlib. Open up
python shell and make sure you can do
 >>> import pygtk
 >>> pygtk.require('2.0')
 >>> import gtk
 >>> import numarray
 >>> import matplotlib
 If not, let us know what error you are getting. You should now be
 able to run python simple_plot.py -dGTK
 
Step 8: Edit setup.py and add the other build flags back in. You can
 set the ones you want to build to 'auto', which will try and build
 an extension if the python dependencies are found. If you still
 have problems with arrayobject.h, let me know. You can add the
 include path to that file in the build_image method in setupext.py
 by doing
 module.include_dirs.append('/your/path/to/numerix/headers')
 
 ie, /home/karthik/usr/include/python/numarray
We do want to improve the build process for people who have stuff in
non-default locations, and it would be very helpful for us if you tell
us explicitly what you had to add and change in the steps above so we
can incorporate as much as possible into the default.
Good luck!
JDH
From: John H. <jdh...@ac...> - 2004年05月13日 10:42:51
>>>>> "Jean-Baptiste" =3D=3D Jean-Baptiste Cazier <jc...@de...> wri=
tes:
 Jean-Baptiste> S=E6ll ! I would like to be able to move my
 Jean-Baptiste> Figure.legend Because the optimal position of the
 Jean-Baptiste> legend on my figure is not always the same, I added
 Jean-Baptiste> a button to the navigation toolbar to give the suer
 Jean-Baptiste> a chance to choose the position of the legend I
 Jean-Baptiste> knwo that I can get a handle on my first legend
 Jean-Baptiste> drawing, but how can I just modify its location ?
 Jean-Baptiste> Is there a move_location method for the
 Jean-Baptiste> Figure.legend ?
There is currently no "move to" location, but there is an offset
method where you can supply a deltxa, deltay in relative sizes, in
your case fractions of the figure width and height. So if you wanted
to move the legend 5% of the figure width to the right and 10% of the
figure height up, you can call
 leg._offset(0.05, 0.10)
The leading underscore means that this method was intended for
internal use, and may change in future releases, but you can try it
and see if it works for you. If it does, I can probably make it
a public method for the next release.
As always you'll need to call canvas.draw after setting the new legend
location.
=20
JDH
From: Jean-Baptiste C. <jc...@de...> - 2004年05月13日 09:42:04
S=E6ll !
I would like to be able to move my Figure.legend
Because the optimal position of the legend on my figure is not always the s=
ame, I added a button to the navigation toolbar to give the suer a chance t=
o choose the position of the legend
I knwo that I can get a handle on my first legend drawing, but how can I ju=
st modify its location ?
Is there a move_location method for the Figure.legend ?
Thanks
Jean-Baptiste
--=20
-----------------------------
Jea...@de...
Department of Statistics
deCODE genetics Sturlugata,8
570 2993 101 Reykjav=EDk
From: Gary R. <ga...@em...> - 2004年05月13日 08:43:01
Z-order is something I hadn't given thought to before John started this thread, but I think that since change may be in the wind, the errorbar z-order is probably wrong at the moment and should probably be changed so that the plot-line is in front of the errorbars. What do others think?
Gary
----- Original Message -----
From: John Hunter <jdh...@ac...>
Date: 2004年5月12日 10:57:16 -0500
To: mat...@li...
Subject: [Matplotlib-users] who's in front
> 
> Earlier the subject of how to draw ticks and grids for image data was
> brought up. The problem was that images obscure the ticks. This can
> be fixed by drawing the ticks after the rest of the axes. The
> question I am considering now is whether the grids should also be
> drawn last. This applies to image and non image axes. If, on a line
> plot or bar plot, should the grids be in front of or behind your data?
> 
> Another possibility would be to put the grids in front with a semi
> transparent alpha, so you could see your data through them. Of
> course, on backends like postscript which don't have an alpha channel,
> this wouldn't work.
> 
> Any preferences?
> 
> JDH
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Sleepycat Software
> Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
> deliver higher performing products faster, at low TCO.
> http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
From: Karthikesh R. <ka...@ja...> - 2004年05月13日 06:19:35
Hi,
i am trying to get matplotlib working. This seems to be as of now the best
that i have found but i cant install it at work. We have a RH9 system, and
matplotlib required a lot of development packages and updates. After all
the installation (which it says is successful), when i try to import
matplotlib or run the examples:
(i am using ipython so i can do run xyz.py)
> run bar_stacked.py
----> RuntimeError: Could not find the matplotlib data files
the path was not working so i manually set the path at the __init__.py
file to path = '/home/karthik/usr/share/matplotlib'
Then when i try it again
> run bar_stacked.py
----> from matplotlib import rcParams
ImportError: cannot import name rcParams
On the third attempt:
> run bar_stacked.py
----> ind = arange(N)
NameError: name 'arange' is not defined
the numerix package was numarray, and while installation the _image.cpp
file had problems with "arrayobject.h", it couldnt find it, i manually set
the path as
#include "/home/karthik/usr/include/python/numarray/arrayobject.h"
How do i proceed now?
With warm regards
karthik
-----------------------------------------------------------------------
Karthikesh Raju,		 email: ka...@ja...
Researcher,			 http://www.cis.hut.fi/karthik
Helsinki University of Technology, Tel: +358-9-451 5389
Laboratory of Comp. & Info. Sc., Fax: +358-9-451 3277
Department of Computer Sc.,
P.O Box 5400, FIN 02015 HUT,
Espoo, FINLAND
-----------------------------------------------------------------------

Showing 15 results of 15

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 によって変換されたページ (->オリジナル) /