Tommy Grav | 1 May 19:31 2006
Picon

Several windows and events

I am using matplotlib to display an image, then click on the image to get the x,y center of
an object in that image. Using this x,y position I would like to display a zoomed in version
of the image in another window. I am however confused on how to generate the second
window and how to deal with the fact that I now want the button click in window 2 to another 
event function.

Cheers

Tommy



tgrav-ee4meeAH724@public.gmane.org

http://homepage.mac.com/tgrav/


"Any intelligent fool can make things bigger, 
more complex, and more violent. It takes a 
touch of genius -- and a lot of courage -- 
to move in the opposite direction"
                         -- Albert Einstein


John Hunter | 1 May 21:05 2006

Re: Several windows and events

>>>>> "Tommy" == Tommy Grav <tgrav@...> writes:

    Tommy> I am using matplotlib to display an image, then click on
    Tommy> the image to get the x,y center of an object in that
    Tommy> image. Using this x,y position I would like to display a
    Tommy> zoomed in version of the image in another window. I am
    Tommy> however confused on how to generate the second window and
    Tommy> how to deal with the fact that I now want the button click
    Tommy> in window 2 to another event function.

Something like this?

from pylab import figure, show, nx
figsrc = figure()
figzoom = figure()

axsrc = figsrc.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False)
axzoom = figzoom.add_subplot(111, xlim=(0.45,0.55), ylim=(0.4,.6), autoscale_on=False)
axsrc.set_title('Click to zoom')
axzoom.set_title('zoom window')
x,y,s,c = nx.mlab.rand(4,200)
s *= 200

axsrc.scatter(x,y,s,c)
axzoom.scatter(x,y,s,c)

def onpress(event):
    if event.button!=1: return
    x,y = event.xdata, event.ydata
    axzoom.set_xlim(x-0.1, x+0.1)
    axzoom.set_ylim(y-0.1, y+0.1)
    figzoom.canvas.draw()

figsrc.canvas.mpl_connect('button_press_event', onpress)
show()

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Tommy Grav | 1 May 21:47 2006
Picon

Re: Several windows and events

Thanks for the solution. That gives me a good starting point 
for further development. However, now I have a follow up 
question. Is there a way to return the x and y positions of the
button click from the event (out to the main program I mean).

Cheers

Tommy



tgrav-ee4meeAH724@public.gmane.org

http://homepage.mac.com/tgrav/


"Any intelligent fool can make things bigger, 
more complex, and more violent. It takes a 
touch of genius -- and a lot of courage -- 
to move in the opposite direction"
                         -- Albert Einstein


John Hunter | 1 May 22:09 2006

Re: Several windows and events

>>>>> "Tommy" == Tommy Grav <tgrav@...> writes:

    Tommy> Thanks for the solution. That gives me a good starting
    Tommy> point for further development. However, now I have a follow
    Tommy> up question. Is there a way to return the x and y positions
    Tommy> of the button click from the event (out to the main program
    Tommy> I mean).

Sure -- just use a class to store the coord data, and implement the
__call__ method so it can be used as a callback

    class Coords:

        def __init__(self):
            self.x, self.y = None, None

        def __str__(self):
            return 'x=%s, y=%s'%(self.x, self.y)

        def __call__(self, event):
            if event.button!=1: return
            x,y = event.xdata, event.ydata
            if x is not None: axzoom.set_xlim(x-0.05, x+0.05)
            if y is not None: axzoom.set_ylim(y-0.05, y+0.05)
            figzoom.canvas.draw()
            self.x, self.y = x, y

    coords = Coords()
    figsrc.canvas.mpl_connect('button_press_event', coords)

Then you can use coords.x and coords.y wherever you want...

JDH

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Ryan Krauss | 2 May 07:07 2006
Picon

usetex windows problem

I am getting the following error from usetex under windows:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
    return self.func(*args)
  File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
e 148, in resize
    self.show()
  File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
e 151, in draw
    FigureCanvasAgg.draw(self)
  File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
398, in draw
    self.figure.draw(renderer)
  File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 529, in draw
    for a in self.axes: a.draw(renderer)
  File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1465, in draw
    self.xaxis.draw(renderer)
  File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 562, in draw
    tick.draw(renderer)
  File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 161, in draw
    if self.label1On: self.label1.draw(renderer)
  File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 858, in draw
    self._mytext.draw(renderer)
  File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 338, in draw
    bbox, info = self._get_layout(renderer)
  File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 186, in _get_lay
out
    w,h = renderer.get_text_width_height(
  File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
249, in get_text_width_height
    Z = self.texmanager.get_rgba(s, size, self.dpi.get(), rgb)
  File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 380, in ge
t_rgba
    pngfile = self.make_png(tex, fontsize, dpi, force=False)
  File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 209, in ma
ke_png
    dvifile = self.make_dvi(tex, fontsize)
  File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 190, in ma
ke_dvi
    stdout=PIPE, close_fds=True)
  File "C:\Python24\lib\subprocess.py", line 500, in __init__
    raise ValueError("close_fds is not supported on Windows "
ValueError: close_fds is not supported on Windows platforms

Please help me.

Thanks,

Ryan

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
Ryan Krauss | 2 May 07:29 2006
Picon

Re: usetex windows problem

I found a thread about a recent fix to texmanager and backend_ps, but
I am still having a problem.  It seems like the basic problem is that
os.system('cd c:\\temp') doesn't seem to work on windows:

C:\Documents and Settings>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system('cd c:\\temp')
0
>>> os.getcwd()
'C:\\Documents and Settings'
>>>

So, when texmanager tries to execute this command:
(Pdb) command
Out[3]: 'cd c:\\temp; latex -interaction=nonstopmode "92ef4637f8938ad7ee6f05b388
9c7251.tex"'

latex can't find the file because the working directory doesn't seem
to actually change.

(This is in texmanager.py around line 200).

Ryan

On 5/2/06, Ryan Krauss <ryanlists@...> wrote:
> I am getting the following error from usetex under windows:
>
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
>     return self.func(*args)
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
> e 148, in resize
>     self.show()
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
> e 151, in draw
>     FigureCanvasAgg.draw(self)
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> 398, in draw
>     self.figure.draw(renderer)
>   File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 529, in draw
>     for a in self.axes: a.draw(renderer)
>   File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1465, in draw
>     self.xaxis.draw(renderer)
>   File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 562, in draw
>     tick.draw(renderer)
>   File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 161, in draw
>     if self.label1On: self.label1.draw(renderer)
>   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 858, in draw
>     self._mytext.draw(renderer)
>   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 338, in draw
>     bbox, info = self._get_layout(renderer)
>   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 186, in _get_lay
> out
>     w,h = renderer.get_text_width_height(
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> 249, in get_text_width_height
>     Z = self.texmanager.get_rgba(s, size, self.dpi.get(), rgb)
>   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 380, in ge
> t_rgba
>     pngfile = self.make_png(tex, fontsize, dpi, force=False)
>   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 209, in ma
> ke_png
>     dvifile = self.make_dvi(tex, fontsize)
>   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 190, in ma
> ke_dvi
>     stdout=PIPE, close_fds=True)
>   File "C:\Python24\lib\subprocess.py", line 500, in __init__
>     raise ValueError("close_fds is not supported on Windows "
> ValueError: close_fds is not supported on Windows platforms
>
> Please help me.
>
> Thanks,
>
> Ryan
>

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
Ryan Krauss | 2 May 07:44 2006
Picon

Re: usetex windows problem

So, I hacked my way through that problem, but now I have another with dvipng:

> c:\python24\lib\site-packages\matplotlib\texmanager.py(250)make_png()
-> raise RuntimeError('dvipng was not able to \
(Pdb) l
245                 process = Popen([command], shell=True, stdin=PIPE, stdout=PI
PE,
246                                 stderr=STDOUT)
247                 exit_status = process.wait()
248                 if exit_status:
249                     pdb.set_trace()
250  ->                 raise RuntimeError('dvipng was not able to \
251     process the flowing file:\n%s\nHere is the full report generated by dvip
ng: \
252     \n\n'% dvifile + process.stdout.read())
253                 else: verbose.report(process.stdout.read(), 'debug')
254     ##            stdin, stdout, stderr = os.popen3(command)
255     ##            verbose.report(stdout.read(), 'debug-annoying')
(Pdb) command
Out[4]: 'dvipng -bg Transparent -D "80.0" -T tight -o "C:\\Documents and Setting
s\\Ryan Krauss\\.matplotlib\\tex.cache\\c1ffe2d853f127e5a2d2d1596af6476a.png" "C
:\\Documents and Settings\\Ryan Krauss\\.matplotlib\\tex.cache\\3c0a8beb4aca9ed9
ba6656bce72309e6.dvi"'
(Pdb) process.stdout.read()
Out[4]: 'This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson\r\n\r\ndvipng: F
atal error, bad -D parameter\r\n\r\n'
(Pdb)

But if I execute the command myself in a dos shell, I get no problems:
C:\Documents and Settings\Ryan Krauss\.matplotlib\tex.cache>dvipng -bg Transpare
nt -D "80.0" -T tight -o "C:\\Documents and Settings\\Ryan Krauss\\.matplotlib\\
tex.cache\\c1ffe2d853f127e5a2d2d1596af6476a.png" "C:\\Documents and Settings\\Ry
an Krauss\\.matplotlib\\tex.cache\\3c0a8beb4aca9ed9ba6656bce72309e6.dvi"
This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
[1]

Ryan

On 5/2/06, Ryan Krauss <ryanlists@...> wrote:
> I found a thread about a recent fix to texmanager and backend_ps, but
> I am still having a problem.  It seems like the basic problem is that
> os.system('cd c:\\temp') doesn't seem to work on windows:
>
> C:\Documents and Settings>python
> Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> os.system('cd c:\\temp')
> 0
> >>> os.getcwd()
> 'C:\\Documents and Settings'
> >>>
>
> So, when texmanager tries to execute this command:
> (Pdb) command
> Out[3]: 'cd c:\\temp; latex -interaction=nonstopmode "92ef4637f8938ad7ee6f05b388
> 9c7251.tex"'
>
> latex can't find the file because the working directory doesn't seem
> to actually change.
>
> (This is in texmanager.py around line 200).
>
> Ryan
>
> On 5/2/06, Ryan Krauss <ryanlists@...> wrote:
> > I am getting the following error from usetex under windows:
> >
> > Exception in Tkinter callback
> > Traceback (most recent call last):
> >   File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
> >     return self.func(*args)
> >   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
> > e 148, in resize
> >     self.show()
> >   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
> > e 151, in draw
> >     FigureCanvasAgg.draw(self)
> >   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> > 398, in draw
> >     self.figure.draw(renderer)
> >   File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 529, in draw
> >     for a in self.axes: a.draw(renderer)
> >   File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1465, in draw
> >     self.xaxis.draw(renderer)
> >   File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 562, in draw
> >     tick.draw(renderer)
> >   File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 161, in draw
> >     if self.label1On: self.label1.draw(renderer)
> >   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 858, in draw
> >     self._mytext.draw(renderer)
> >   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 338, in draw
> >     bbox, info = self._get_layout(renderer)
> >   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 186, in _get_lay
> > out
> >     w,h = renderer.get_text_width_height(
> >   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> > 249, in get_text_width_height
> >     Z = self.texmanager.get_rgba(s, size, self.dpi.get(), rgb)
> >   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 380, in ge
> > t_rgba
> >     pngfile = self.make_png(tex, fontsize, dpi, force=False)
> >   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 209, in ma
> > ke_png
> >     dvifile = self.make_dvi(tex, fontsize)
> >   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line 190, in ma
> > ke_dvi
> >     stdout=PIPE, close_fds=True)
> >   File "C:\Python24\lib\subprocess.py", line 500, in __init__
> >     raise ValueError("close_fds is not supported on Windows "
> > ValueError: close_fds is not supported on Windows platforms
> >
> > Please help me.
> >
> > Thanks,
> >
> > Ryan
> >
>

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
Lionel Roubeyrie | 2 May 10:00 2006
Picon

matplotlib and mod_python

Hi all,
some students in our organisation sent me a problem with matplotlib and 
mod_python, a simple script generates a plot of temp/pressure, all works fine 
if they run it from the command-line, but if they use it from a apache web 
server they receive this :
----------------------------------------------------
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in
HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 136, 
in
handler
    result = util.apply_fs_data(object, req.form, req=req)

  File "/usr/lib/python2.3/site-packages/mod_python/util.py", line 361, in
apply_fs_data
    return object(**args)

  File "/var/www/syrso_v2/tests/essai.py", line 11, in index

AttributeError: 'module' object has no attribute 'use'
---------------------------------------------------------

where the line 11 is :
matplotlib.use('Agg')
just after a import matplotlib!

Thanks for any help

--

-- 
Lionel Roubeyrie - lroubeyrie@...
LIMAIR
http://www.limair.asso.fr

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Darren Dale | 2 May 14:03 2006
Picon

Re: Re: usetex windows problem

Hi Ryan,

I'm sorry you are having trouble. I'm sick and am unable to help you work 
through this today. You haven't mentioned what mpl version you are using, but 
I would suggest opening an ipython shell and trying to execute the command 
via the subprocess module.

Darren

On Tuesday 02 May 2006 1:44 am, Ryan Krauss wrote:
> So, I hacked my way through that problem, but now I have another with 
dvipng:
> > c:\python24\lib\site-packages\matplotlib\texmanager.py(250)make_png()
>
> -> raise RuntimeError('dvipng was not able to \
> (Pdb) l
> 245                 process = Popen([command], shell=True, stdin=PIPE,
> stdout=PI PE,
> 246                                 stderr=STDOUT)
> 247                 exit_status = process.wait()
> 248                 if exit_status:
> 249                     pdb.set_trace()
> 250  ->                 raise RuntimeError('dvipng was not able to \
> 251     process the flowing file:\n%s\nHere is the full report generated by
> dvip ng: \
> 252     \n\n'% dvifile + process.stdout.read())
> 253                 else: verbose.report(process.stdout.read(), 'debug')
> 254     ##            stdin, stdout, stderr = os.popen3(command)
> 255     ##            verbose.report(stdout.read(), 'debug-annoying')
> (Pdb) command
> Out[4]: 'dvipng -bg Transparent -D "80.0" -T tight -o "C:\\Documents and
> Setting s\\Ryan
> Krauss\\.matplotlib\\tex.cache\\c1ffe2d853f127e5a2d2d1596af6476a.png" "C
>
> :\\Documents and Settings\\Ryan
> : Krauss\\.matplotlib\\tex.cache\\3c0a8beb4aca9ed9
>
> ba6656bce72309e6.dvi"'
> (Pdb) process.stdout.read()
> Out[4]: 'This is dvipng 1.6 Copyright 2002-2005 Jan-Ake
> Larsson\r\n\r\ndvipng: F atal error, bad -D parameter\r\n\r\n'
> (Pdb)
>
> But if I execute the command myself in a dos shell, I get no problems:
> C:\Documents and Settings\Ryan Krauss\.matplotlib\tex.cache>dvipng -bg
> Transpare nt -D "80.0" -T tight -o "C:\\Documents and Settings\\Ryan
> Krauss\\.matplotlib\\ tex.cache\\c1ffe2d853f127e5a2d2d1596af6476a.png"
> "C:\\Documents and Settings\\Ry an
> Krauss\\.matplotlib\\tex.cache\\3c0a8beb4aca9ed9ba6656bce72309e6.dvi" This
> is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
> [1]
>
> Ryan
>
> On 5/2/06, Ryan Krauss <ryanlists@...> wrote:
> > I found a thread about a recent fix to texmanager and backend_ps, but
> > I am still having a problem.  It seems like the basic problem is that
> > os.system('cd c:\\temp') doesn't seem to work on windows:
> >
> > C:\Documents and Settings>python
> > Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on
> > win32 Type "help", "copyright", "credits" or "license" for more
> > information.
> >
> > >>> import os
> > >>> os.system('cd c:\\temp')
> >
> > 0
> >
> > >>> os.getcwd()
> >
> > 'C:\\Documents and Settings'
> >
> >
> > So, when texmanager tries to execute this command:
> > (Pdb) command
> > Out[3]: 'cd c:\\temp; latex -interaction=nonstopmode
> > "92ef4637f8938ad7ee6f05b388 9c7251.tex"'
> >
> > latex can't find the file because the working directory doesn't seem
> > to actually change.
> >
> > (This is in texmanager.py around line 200).
> >
> > Ryan
> >
> > On 5/2/06, Ryan Krauss <ryanlists@...> wrote:
> > > I am getting the following error from usetex under windows:
> > >
> > > Exception in Tkinter callback
> > > Traceback (most recent call last):
> > >   File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
> > >     return self.func(*args)
> > >   File
> > > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> > > lin e 148, in resize
> > >     self.show()
> > >   File
> > > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> > > lin e 151, in draw
> > >     FigureCanvasAgg.draw(self)
> > >   File
> > > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py",
> > > line 398, in draw
> > >     self.figure.draw(renderer)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 529,
> > > in draw for a in self.axes: a.draw(renderer)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1465,
> > > in draw self.xaxis.draw(renderer)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 562, in
> > > draw tick.draw(renderer)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 161, in
> > > draw if self.label1On: self.label1.draw(renderer)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 858, in
> > > draw self._mytext.draw(renderer)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 338, in
> > > draw bbox, info = self._get_layout(renderer)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\text.py", line 186, in
> > > _get_lay out
> > >     w,h = renderer.get_text_width_height(
> > >   File
> > > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py",
> > > line 249, in get_text_width_height
> > >     Z = self.texmanager.get_rgba(s, size, self.dpi.get(), rgb)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line
> > > 380, in ge t_rgba
> > >     pngfile = self.make_png(tex, fontsize, dpi, force=False)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line
> > > 209, in ma ke_png
> > >     dvifile = self.make_dvi(tex, fontsize)
> > >   File "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", line
> > > 190, in ma ke_dvi
> > >     stdout=PIPE, close_fds=True)
> > >   File "C:\Python24\lib\subprocess.py", line 500, in __init__
> > >     raise ValueError("close_fds is not supported on Windows "
> > > ValueError: close_fds is not supported on Windows platforms
> > >
> > > Please help me.
> > >
> > > Thanks,
> > >
> > > Ryan
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--

-- 
Darren S. Dale, Ph.D.
dd55@...

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Charlie Moad | 2 May 14:03 2006
Picon

Re: problem with matplotlib 0.87.1

This should probably be on the matplotlib list, but 0.87.1 was
compiled against numpy 0.9.5.  You have to use that version.  This
type of problem won't happen as much once numpy hits 1.0.  0.87.2 was
compiled against numpy 0.9.6.

- Charlie

On 5/2/06, Ryan Krauss <ryanlists <at> gmail.com> wrote:
> I am working in windows and was having trouble with matplotlib 0.87.2,
> so I tried downgrading to 0.87.1, but now I can't get ipython -pylab
> to start.  I get this message:
>
> C:\Python24\Scripts>python ipython -pylab
> Traceback (most recent call last):
>   File "ipython", line 28, in ?
>     IPython.Shell.start().mainloop()
>   File "C:\Python24\Lib\site-packages\IPython\Shell.py", line 950, in start
>     return shell()
>   File "C:\Python24\Lib\site-packages\IPython\Shell.py", line 865, in __init__
>     shell_class=MatplotlibShell)
>   File "C:\Python24\Lib\site-packages\IPython\Shell.py", line 55, in __init__
>     debug=debug,shell_class=shell_class)
>   File "C:\Python24\Lib\site-packages\IPython\ipmaker.py", line 90, in make_IPyt
> hon
>     embedded=embedded,**kw)
>   File "C:\Python24\Lib\site-packages\IPython\Shell.py", line 501, in __init__
>     user_ns,b2 = self._matplotlib_config(name)
>   File "C:\Python24\Lib\site-packages\IPython\Shell.py", line 390, in _matplotli
> b_config
>     from matplotlib import backends
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\__init__.py", line 56,
>  in ?
>     new_figure_manager, draw_if_interactive, show = pylab_setup()
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\__init__.py", line 24,
>  in pylab_setup
>     globals(),locals(),[backend_name])
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
> e 9, in ?
>     from backend_agg import FigureCanvasAgg
>   File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> 82, in ?
>     from matplotlib.figure import Figure
>   File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 6, in ?
>     from axes import Axes, Subplot, PolarSubplot, PolarAxes
>   File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 23, in ?
>     from contour import ContourSet
>   File "C:\Python24\Lib\site-packages\matplotlib\contour.py", line 18, in ?
>     import _contour
>   File "C:\Python24\Lib\site-packages\matplotlib\_contour.py", line 17, in ?
>     from matplotlib._ns_cntr import *
> RuntimeError: module compiled against version 90500 of C-API but this version of
>  numpy is 90504
>
> I tried deleting the IPython, scipy, numpy, and matplotlib directories
> and reinstalling them, but it didn't help (I installed in the order
> numpy, scipy, matplotlib, Ipython).
>
> Ryan
>
> _______________________________________________
> IPython-user mailing list
> IPython-user <at> scipy.net
> http://scipy.net/mailman/listinfo/ipython-user
>

Gmane