On Saturday 16 December 2006 19:42, Xavier Gnata wrote: > Hi, > > Each time I'm working on C++ codes using vector or valarray, I would > like to be able to plot them. > The problem is that there is no straitforward way to do that in C++. > My goal is not to code a QT or GTK application but only to be able to > plot 1D and 2D things from one given large C++ code without having to > add lots of lines of codes in my code (let say it is intend to be used > in debug phase). > > Questions : > Is there a way to call pylab plot and imshow from a C++ code ? > In this case, I do not care if we have to copy the array and it can be > slow. It would be a so nice feature to debug C++ image processing codes. > Any example of code is welcome even they are not calling matplotlib but > anthing else in python. > > Xavier. > ps : In my codes, 2D images are stored as in a class derived from > valarray (1D array) adding the size of the image along the 2 directions > as private members.
Hi Xavier, you should really check out the Boost::Python libraries. They allow you, among other things, to expose your C++ container classes as python objects. I'm using them heavily in my project and I'm very satisfied. Check them out here: http://www.boost.org/libs/python/doc/ HTH, Francesco ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users