graphs in Python during debugging

Sandy Sandy cde3 at live.com
Tue May 11 12:26:13 EDT 2010




Hi friends

Can you help pls  to find how to plot graphs in Python
during debugging without destroying figures to continue to debug

the mutter is:

during debugging the  debug processes stacks when fig is created

for example, in code

import random

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

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.



Best Regards

Sandy

 		 	   		  
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100511/73e53f93/attachment.html>


More information about the Python-list mailing list