| 1289 | |
| 1290 | template<typename Numeric> |
| 1291 | bool named_plot(const std::string& name, const std::vector<Numeric>& y, const std::string& format = "") |
| 1292 | { |
| 1293 | detail::_interpreter::get(); |
| 1294 | |
| 1295 | PyObject* kwargs = PyDict_New(); |
| 1296 | PyDict_SetItemString(kwargs, "label", PyString_FromString(name.c_str())); |
| 1297 | |
| 1298 | PyObject* yarray = detail::get_array(y); |
| 1299 | |
| 1300 | PyObject* pystring = PyString_FromString(format.c_str()); |
| 1301 | |
| 1302 | PyObject* plot_args = PyTuple_New(2); |
| 1303 | |
| 1304 | PyTuple_SetItem(plot_args, 0, yarray); |
| 1305 | PyTuple_SetItem(plot_args, 1, pystring); |
| 1306 | |
| 1307 | PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_plot, plot_args, kwargs); |
| 1308 | |
| 1309 | Py_DECREF(kwargs); |
| 1310 | Py_DECREF(plot_args); |
| 1311 | if (res) Py_DECREF(res); |
| 1312 | |
| 1313 | return res; |
| 1314 | } |
| 1315 | |
| 1316 | template<typename Numeric> |
| 1317 | bool named_plot(const std::string& name, const std::vector<Numeric>& x, const std::vector<Numeric>& y, const std::string& format = "") |
nothing calls this directly
no test coverage detected