matplotlib-cpp
matplotlib-cpp copied to clipboard
No function "savefig" under namespace matplotlibcpp
I just tried to build code with the minimal example, and the compiler complained that "matplotlibcpp::savefig" is not declared. I checked the head file "matplotlibcpp.h" and indeed, I found no wrapper definition for "savefig". Is it a bug or did I miss something?
Hey, did you resolve this issue somehow?
BTW, I'm using ubuntu 20.04, GCC, Python3.8.
I manage to compile the code by changing savefig to save.
Now I get a segmentation fault. It seems like the error occurs in the file matplotlibcpp.h in line 288, when calling Py_Finalize().
Edit:
I think this is a duplicate of #248. with the same solution of adding Py_Finalize();
Thanks.