On 10/11/07, Alexander Schmolck <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using matplotlib in a C++ app (with a qt4 gui), by embedding python with > boost::python. The C++ app calls Py_Initialize(), init_myplottingmodule(), and > boost::python::import("matplotlib.pylab") once on startup and certain GUI > events then fire up a matplotlib window via calls like this one: > > // simplified version > void plotCurve(){ > clf(); > title("Diagonal line plot"); > double O1[] = {0,1}; > plot(std::vector<double>(O1,O1+2), std::vector<double>(O1,O1+2), "b:"); > show();
Eeeeew, that looks really dangerous. For starters, I would never try to do this using pylab, but rather follow the lead of examples/embedding_in_qt.py. Then you won't be competing for the mainloop.... JDH ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users