File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1565,6 +1565,24 @@ inline void legend()
1565
1565
Py_DECREF (res);
1566
1566
}
1567
1567
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
+
1568
1586
template <typename Numeric>
1569
1587
void ylim (Numeric left, Numeric right)
1570
1588
{
You can’t perform that action at this time.
0 commit comments