How to call python matplotlib in Qt C++ project?

c++, matplotlib, python, qt

Solution

You can create a python script with function calls to matplotlib and add them as callback functions in your C++ code.

This tutorial explains how this can be done.

I also recommend reading the documentation on Python.h.

Problem

Python matplotlib gives very nice figures. How to call python matplotlib in Qt C++ project? I'd like to put those figures in Qt dialogs and data are transferred via memory.

Original source