[SciPy-user] xplt issues

Arnd Baecker arnd.baecker at web.de
Tue Mar 2 11:15:51 CST 2004


Hi,

we are using scipy.xplt quite happily as it works nicely both under
linux and windows. However, there are two issues which cause
problems in the portability of the code:

a) Plot a single point

##################################
from scipy.xplt import *

window(0)
limits(0.0,10.0,0.0,1.0)
# this does not work (i.e does not show anything) under linux:
x=array([0.5])
y=array([0.5])
plg(y,x,marker='\2',width=10)

# this does work under linux:
x=array([0.5,0.5])
y=array([0.5,0.5])
plg(y,x,marker='\2',width=10)
##################################

I don't know what the origin of this differing behaviour is
(gd library ?)

b) This example illustrates a `dynamic' plot

##################################
from scipy.xplt import *

figure()
x=arange(0.0,0.5,0.001)
hold('on')
for xval in x:
    print xval
    yval = sin(xval / 4)
    plot(xval, yval, 'x')
    pause(1)
##################################

The pause(1) is essential under linux so that the
points are shown one after another.
However under windows (enthought_python-2.3.exe)
the pause command leads to a crash of the running python interpreter.
Moreover pause(1) is not necessary under windows.
(I think the best would be if this was also true for the linux
version - would this be possible ??)

It would be great if these platform inconsistencies could get fixed!
Maybe we can spot the origin for a) once given a pointer in the right
direction. (Concerning b) we don't have the tools for windows ...).

Thanks in advance for any advice,

Arnd










More information about the SciPy-user mailing list