How to use matplotlib to draw to an existing Axes object at C++ side? #3470
-
In my project, I want to call matplotlib to draw (mainly add patches) to an existing Axes object (created from python side) at C++ side. I am wondering how to do that with pybind11? In other words, I create an Axes object in python. This Axes object is later used as a parameter to a C++ function. And the C++ function draws something (mainly add patches) to this Axes. I don't know how to define a C++ function that takes an Axes object as the parameter and calls matplotlib to draw to it. Thank you for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Have you had a chance to review the docs about accessing Python object via C++ API? |
Beta Was this translation helpful? Give feedback.
Have you had a chance to review the docs about accessing Python object via C++ API?
https://pybind11.readthedocs.io/en/stable/advanced/pycpp/object.html