HotPop | 1 Sep 05:52 2004

use 'WX' ignored

Python 2.3.4 on XP , latest matplotlib

The use 'WX' command is being ignored and the examples always come up in 
Tkinter.
Funny thing is, before the latest XP install it used to work as 
advertized (same versions of everything).
Also, matplotlib.get_backend() reports correctly before and after the 
use command (tkagg before, wx after),
and the commandline -dWX works, though sometimes incredibly slowly (for 
"tale of two subplots").
I've tried the wxpython embedding program using 2 splitter windows in a 
recent mail thread, and that works, too.

Any ideas or ways to debug this ?

Ray Pasco

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
Faust, Markus | 1 Sep 10:30 2004
Picon

Problems with series of plots

Hi,

I'm trying to plot a series of graphs

#!/usr/bin/python
# -*- coding: UTF-8 -*-

# Dr. Markus Faust
# markus.faust <at> +>>no-spam<<+space.eads.net

from numarray import *
from matplotlib.matlab import *

x = arange(400.)*0.01+1.
y = x**2*exp(x)

for i in range(3):
    clf()
    Figure(figsize=(11.0,7.5))
    lines=semilogy(x, abs(y), 'r-')
    set(lines, 'linewidth', 2.0)
    title('test')
    xlabel('x')
    ylabel('y')
    grid('on')
    fname = 'test' + str(i) +'.png'
    savefig(fname, dpi=250)
    show()

With matplotlib-0.61.0-numarray0.9-win32-py2.3 this works as it should.
(Continue reading)

Jean-Michel Philippe | 1 Sep 14:36 2004

zoom on

Hello,

I would like to activate the zoom tool on a figure after a plot, like 
'zoom on' does in Matlab. I guess it should be quite easy but I didn't 
find how to do. I saw a 'zoom' method for the 'NavigationToolbar2' class 
that seems to be what I am looking for but I don't how to use this...

Has someone already achieved this?

JM. Philippe

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
Gary | 1 Sep 14:54 2004
Picon

anim_tk.py fails

In revisiting an old project, I tried the example anim_tk.py.
On two different WinXP machines, a "ghost" window appears (can see right
through it)
and the following:

------------------------------------
C:\Python23\Lib\site-packages\matplotlib\examples>python anim_tk.py
elapsed 10.7944733008
Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
-------------------------------------

please embarrass me by pointing out that I've forgotten to install
something obvious.

BTW, It's not possible to say thank you enough times.
matplotlab/ipython/scipy is just a dream for scientific work.  I also
add Maxima and Vpython (and TeX/LaTeX/ConTeXt) to my soup, fwiw.

-gary

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
(Continue reading)

Stephen Walton | 1 Sep 18:11 2004

Re: zoom on

On Wed, 2004-09-01 at 05:36, Jean-Michel Philippe wrote:

> I would like to activate the zoom tool on a figure after a plot,

http://matplotlib.sourceforge.net/tutorial.html#toolbar2

Zooming is available via the widgets at the bottom of the plot menu by
default.

--

-- 
Stephen Walton <stephen.walton@...>
Dept. of Physics & Astronomy, Cal State Northridge

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
John Hunter | 1 Sep 20:31 2004

Re: use 'WX' ignored

>>>>> "HotPop" == HotPop  <pascor@...> writes:

    HotPop> Python 2.3.4 on XP , latest matplotlib The use 'WX'
    HotPop> command is being ignored and the examples always come up
    HotPop> in Tkinter.  Funny thing is, before the latest XP install
    HotPop> it used to work as advertized (same versions of
    HotPop> everything).  Also, matplotlib.get_backend() reports
    HotPop> correctly before and after the use command (tkagg before,
    HotPop> wx after), and the commandline -dWX works, though
    HotPop> sometimes incredibly slowly (for "tale of two subplots").
    HotPop> I've tried the wxpython embedding program using 2 splitter
    HotPop> windows in a recent mail thread, and that works, too.

    HotPop> Any ideas or ways to debug this ?

I assume you are using use *before* you import matplotlib.matlab?  Eg

import matplotlib
matplotlib.use('WX')
import matplotlib.matlab ...

ANd you are running your script from the shell.  In an IDE, if
matplotlib.matlab has already been imported, and you rerun your script
from the IDE, your 'use' calls will be w/o effect.  Thus it's
important to test from a shell (tough on win32, I know), or double
click the script to insure a new python interpreter.

I'm on the road en route to the SciPy conference, so will be mostly
out of touch for a few days....

(Continue reading)

John Hunter | 1 Sep 20:36 2004

Re: Problems with series of plots

>>>>> "Faust," == Faust, Markus <Markus.Faust@...> writes:

    Faust,> Hi, I'm trying to plot a series of graphs

    Faust,> #!/usr/bin/python # -*- coding: UTF-8 -*-

    Faust,> # Dr. Markus Faust #
    Faust,> markus.faust <at> +>>no-spam<<+space.eads.net

    Faust,> from numarray import * from matplotlib.matlab import *

    Faust,> x = arange(400.)*0.01+1.  y = x**2*exp(x)

    Faust,> for i in range(3): clf() Figure(figsize=(11.0,7.5))
    Faust,> lines=semilogy(x, abs(y), 'r-') set(lines, 'linewidth',
    Faust,> 2.0) title('test') xlabel('x') ylabel('y') grid('on')
    Faust,> fname = 'test' + str(i) +'.png' savefig(fname, dpi=250)
    Faust,> show()

    Faust,> With matplotlib-0.61.0-numarray0.9-win32-py2.3 this works
    Faust,> as it should.  One plot windows occurs, I click it away
    Faust,> and the next occurs.

    Faust,> But with matplotlib-0.62.4.win32-py2.3.exe the program
    Faust,> behaves strange.  The first windows occurs and I can click
    Faust,> it away but the next windows can not be controlled
    Faust,> anymore. Is that anticipated?

    Faust,> I'm working on a Windows XP Prof. PC with Python 2.3.4 and
    Faust,> numarray 0.9.
(Continue reading)

John Hunter | 1 Sep 20:43 2004

Re: anim_tk.py fails

>>>>> "Gary" == Gary  <pajer@...> writes:

    Gary> In revisiting an old project, I tried the example
    Gary> anim_tk.py.  On two different WinXP machines, a "ghost"
    Gary> window appears (can see right through it) and the following:

    Gary> ------------------------------------
    Gary> C:\Python23\Lib\site-packages\matplotlib\examples>python
    Gary> anim_tk.py elapsed 10.7944733008 Fatal Python error:
    Gary> PyEval_RestoreThread: NULL tstate

    Gary> This application has requested the Runtime to terminate it
    Gary> in an unusual way.  Please contact the application's support
    Gary> team for more information.
    Gary> -------------------------------------

    Gary> please embarrass me by pointing out that I've forgotten to
    Gary> install something obvious.

I'll have to take a look at this next week since I don't have access
to a win32 platform right now.  It seems to be running fine on linux.

    Gary> BTW, It's not possible to say thank you enough times.
    Gary> matplotlab/ipython/scipy is just a dream for scientific
    Gary> work.  I also add Maxima and Vpython (and TeX/LaTeX/ConTeXt)
    Gary> to my soup, fwiw.

Thanks, it's great to hear encouraging words. Fernando and I will be
meeting tonight with some of the numarray and scipy folks, and so
hopefully we can come up with some more fruitful areas to make this a
(Continue reading)

Jean-Michel Philippe | 2 Sep 10:33 2004

Re: zoom on

stephen.walton@... wrote:
> Zooming is available via the widgets at the bottom of the plot menu by
> default.

Ok but I would like to activate zooming for users within the program. 
The purpose is to display all the figures with the zoom activated by 
default because in this (small) application users always have to zoom.

JM.

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
HotPop | 2 Sep 16:26 2004

How to set frame size ?

Does anyone know how to set the frame size in example  embedding_in_wx2.py ?
Apparently the FigureCanvas is overiding my attempt to set the 
dimensions in the CanvasFrame's __init__.

Ray Pasco

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click

Gmane