On Mon, Jan 5, 2009 at 9:00 AM, flo_wer <wer...@ewlw.de> wrote: > > Hi, > I am using matplotlib to create a figure in a pythonCard script that looks > like this > > def on_button_mouseClick(self, event): > import matplotlib.pyplot as plt > > plt.figure(1) > for point in list: > plt.plot([x],[y],'bo') > plt.title('Water balance %10s' % Gew_Name[0]) > plt.xlabel('Station in km') > plt.ylabel('Flux in L/s') > plt.show() > > plt.clf() > > My problem is that the program will not continue after that. I tried to look > for commands to delete the figure but clf() was all I found. I am working > with windows xp and the idle shell. To close idle is the only thing that > helps. I intended to produce some more figures after the script has > calculated balances for a stream network. As you might have noticed, I am > not a python expert so please excuse my humpy description of the problem.
It looks like you are trying to use pyplot is an embedded GUI and you might be better off trying to "embed" mpl in the GUI following the examples at http://matplotlib.sourceforge.net/examples/user_interfaces/index.html See also: http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show http://matplotlib.sourceforge.net/faq/installing_faq.html#id1 JDH ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users