Using Matplotlib in a Vala Project?

Has anyone successfully used matplotlib in a application written in the Vala language.

The application would use Gtk4 library so cario is available. I could also foresee challenges with passing data structures.

Thoughts, suggestions please.

Regards
Greg

Matplotlib is written in Python, and is not really introspectable from other languages. Python has an embedding API in C, and Vala can call C, through which you could call Python code that runs Matplotlib, but that seems like it would be a lot of work. It is perhaps going to be simpler to have a Python script that you shell out to from Vala, and then communicate over stdout:
https://matplotlib.org/stable/gallery/misc/print_stdout_sgskip.html

Thank you for taking the time to reply, appreciated.
the situation is much as I expected but thank you for the possible solution.

Its a pity there is not a graph/chart widget in Gtk. Perhaps I’ll have to suggest it.
Regards

I don’t know if it would work here and it may not be feature complete, but there’s a matplotlib c++ bindings library and I think going from C to C++ is easier than C to Python?