| 2445 | |
| 2446 | template<typename Numeric> |
| 2447 | bool update(const std::vector<Numeric>& x, const std::vector<Numeric>& y) { |
| 2448 | assert(x.size() == y.size()); |
| 2449 | if(set_data_fct) |
| 2450 | { |
| 2451 | PyObject* xarray = detail::get_array(x); |
| 2452 | PyObject* yarray = detail::get_array(y); |
| 2453 | |
| 2454 | PyObject* plot_args = PyTuple_New(2); |
| 2455 | PyTuple_SetItem(plot_args, 0, xarray); |
| 2456 | PyTuple_SetItem(plot_args, 1, yarray); |
| 2457 | |
| 2458 | PyObject* res = PyObject_CallObject(set_data_fct, plot_args); |
| 2459 | if (res) Py_DECREF(res); |
| 2460 | return res; |
| 2461 | } |
| 2462 | return false; |
| 2463 | } |
| 2464 | |
| 2465 | // clears the plot but keep it available |
| 2466 | bool clear() { |
nothing calls this directly
no test coverage detected