Sebastian Schaetz
unread,Oct 26, 2011, 12:35:19 PM10/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to glumpy-users
Hi,
I'm using glumpy as a tool to easily visualize 2d numpy data
interactively from the ipython. My problem is that ipython is not
responsive as long as the glumpy window is open and (more importantly)
that ipython exits after I close the window. I'm on Ubuntu 11.10 x64
and I tried both with ipython 0.11 and the default 0.10.2.
This is the code I use
def showm(data, dim):
# expect 3 dimensional x, y and frame
print data.shape
x = data.shape[0]
y = data.shape[1]
fig = glumpy.figure(size=(x, y))
frame = fig.add_frame(aspect=1)
image = glumpy.image.Image(abs(data[:, :, dim]))
@fig.event
def on_draw():
fig.clear()
frame.draw(x=frame.x, y=frame.y )
image.draw(x=frame.x, y=frame.y, z=0,
width=frame.width, height=frame.height )
fig.show()
and I run it like so from ipython
showm(a,5)
What am I doing wrong?
Thans in advance,
Sebastian