| 1991 | } |
| 1992 | |
| 1993 | inline void ylabel(const std::string &str, const std::map<std::string, std::string>& keywords = {}) |
| 1994 | { |
| 1995 | detail::_interpreter::get(); |
| 1996 | |
| 1997 | PyObject* pystr = PyString_FromString(str.c_str()); |
| 1998 | PyObject* args = PyTuple_New(1); |
| 1999 | PyTuple_SetItem(args, 0, pystr); |
| 2000 | |
| 2001 | PyObject* kwargs = PyDict_New(); |
| 2002 | for (auto it = keywords.begin(); it != keywords.end(); ++it) { |
| 2003 | PyDict_SetItemString(kwargs, it->first.c_str(), PyUnicode_FromString(it->second.c_str())); |
| 2004 | } |
| 2005 | |
| 2006 | PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_ylabel, args, kwargs); |
| 2007 | if(!res) throw std::runtime_error("Call to ylabel() failed."); |
| 2008 | |
| 2009 | Py_DECREF(args); |
| 2010 | Py_DECREF(kwargs); |
| 2011 | Py_DECREF(res); |
| 2012 | } |
| 2013 | |
| 2014 | inline void set_zlabel(const std::string &str, const std::map<std::string, std::string>& keywords = {}) |
| 2015 | { |
nothing calls this directly
no outgoing calls
no test coverage detected