I would like to use matplotlib to incorporate plots into my fltk
application. I would like to do this by writing a python function to
create the appropriate graphic using matplotlib. When I want to update
the figure, I want to call an update function written by me in python
which computes the new graphic and displays it. The key point is that I
want to display the figure in a non-blocking way so that control can
return to my fltk application while the figure is still being displayed.
To prototype this I have created a file containing the following python
import pylab as p
The problem I'm having is that if I execute these commands from a python
(where filename is a file containing the above commands) then the figure
isn't being drawn until after sleep is executed. What I'd like is for
this function to just make the figure and leave it there while control
returns to the calling function. I can then create the plot from my
application(written in c) by linking with python and calling 'execfile'
where execfile contains the commands to make the plot.
I'm new to Python and appreciate any help.