Hi all,
I am new born in Python ( 1 week old)

 

Can you pls help to understand the basic concept of
matpltlib interacting with Python

 

the mutter is:

during debugging the  debug processes stacks when fig is created

for example, in code





import matplotlib.pyplot as plt

from pylab import *

x= 23;

y = 111111;

print(23456)

plt.plot(range(10))

plot([1,2,3])

show()

print(11111111)

a=888



it is impossible after show() to continue debug in any IDE for example Wingwar
or pythonxy 

as stated in

Beginning Python Visualization - Crafting Visual Transformation Scripts (2009)

page  187



Note If you’re not using matplotlib interactively in Python, be sure

to call the function show() after all

graphs have been generated, as it enters a user interface main loop

that will stop execution of the rest of

your code. The reason behind this behavior is that matplotlib is

designed to be embedded in a GUI as well.

In Windows, if you’re working from interactive Python, you need only

issue show() once; close the figures

(or figures) to return to the shell. Subsequent plots will be drawn

automatically without issuing show(), and

you’ll be able to plot graphs interactively.









I tried the code 

 

 

with threads

as suggested in 

http://matplotlib.sourceforge.net/users/shell.html

 

code
taken from people
from wingware

http://www.wingware.com/doc/howtos/matplotlib

 

 

from threading import Timer

t = Timer(0, show)

t.start()



  but still debugging process gets
stuck...


import
matplotlib as mpl

from
pylab import plot,show,close,ion

x
= range(10)

plot(x)

'show()'

from
threading import Timer

t
= Timer(0, show)

t.start()

'ion()
the same result with or not'

a
= 1222233

y
= [2, 8, 3, 9, 4]

plot(y)

 

zz=
12346

print(44444)



Best Regards

Sandy

                                          
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
------------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to