[SciPy-user] image_module

eric eric at scipy.org
Sun Mar 3 06:18:14 CST 2002


Hey Karshi,

I'm not sure what is causing this problem.  One possible solution is to use
SciPy 0.1, but install the plt package from the current CVS.  You can do this by
copying <cvs_version>/scipy/plt directory into
/usr/local/lib/python2.1/site-packages/scipy.  Hopefully that'll solve the
problem.

see ya,
eric

----- Original Message -----
From: "Karshi" <karshi.hasanov at utoronto.ca>
To: <eric at scipy.org>
Cc: <scipy-user at scipy.net>
Sent: Thursday, February 28, 2002 11:36 PM
Subject: [SciPy-user] image_module


>
> Hi Eric,
>
> I couldn't get the CVS version of scipy work, and had go back to
> the version 0.1.
> The following code works:
> -----------------------------------------------------------------
> from Numeric import *
> import gui_thread
> from scipy import plt
> from scipy import *
>
> Img = zeros((256,256), Float32)
>
> for i in arange(256):
>     for j in arange(256):
>         r = sqrt(pow(i-128,2)+pow(j-128,2))
>
>         if r <= 60:
>             Img[i,j]= 100
>
> #plt.image(Img)
>
> x = arange(0,5)
> y = special.j1(x)
> plt.plot(x,y)
>
> plt.image(Img)
> plt.grid('off')
> --------------------------------------------------------------------
> But if I take below lines out :
> x = arange(0,5)
> y = special.j1(x)
> plt.plot(x,y)
> ----------------
> It will give me errors like this:
> >>>
> Traceback (most recent call last):
>   File "/home/Study/Matlab/Sphere.py", line 15, in ?
>     plt.image(Img)
>   File "/usr/local/lib/python2.1/site-packages/scipy/plt/interface.py", line
> 427, in image
>     axis('equal')
>   File "/usr/local/lib/python2.1/site-packages/scipy/plt/interface.py", line
> 174, in axis
>     x_ticks = _active.x_axis.ticks
> AttributeError: axis_window instance has no attribute 'ticks'
> -------------------------------------------------------------
> I don't understand why ?
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>





More information about the SciPy-user mailing list