File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1565,6 +1565,24 @@ inline void legend()
15651565 Py_DECREF (res);
15661566}
15671567
1568+ inline void legend (const std::map<std::string, std::string>& keywords)
1569+ {
1570+ detail::_interpreter::get ();
1571+
1572+ // construct keyword args
1573+ PyObject* kwargs = PyDict_New ();
1574+ for (std::map<std::string, std::string>::const_iterator it = keywords.begin (); it != keywords.end (); ++it)
1575+ {
1576+ PyDict_SetItemString (kwargs, it->first .c_str (), PyString_FromString (it->second .c_str ()));
1577+ }
1578+
1579+ PyObject* res = PyObject_Call (detail::_interpreter::get ().s_python_function_legend , detail::_interpreter::get ().s_python_empty_tuple , kwargs);
1580+ if (!res) throw std::runtime_error (" Call to legend() failed." );
1581+
1582+ Py_DECREF (kwargs);
1583+ Py_DECREF (res);
1584+ }
1585+
15681586template <typename Numeric>
15691587void ylim (Numeric left, Numeric right)
15701588{
You can’t perform that action at this time.
0 commit comments