| 1792 | |
| 1793 | |
| 1794 | inline void tick_params(const std::map<std::string, std::string>& keywords, const std::string axis = "both") |
| 1795 | { |
| 1796 | detail::_interpreter::get(); |
| 1797 | |
| 1798 | // construct positional args |
| 1799 | PyObject* args; |
| 1800 | args = PyTuple_New(1); |
| 1801 | PyTuple_SetItem(args, 0, PyString_FromString(axis.c_str())); |
| 1802 | |
| 1803 | // construct keyword args |
| 1804 | PyObject* kwargs = PyDict_New(); |
| 1805 | for (std::map<std::string, std::string>::const_iterator it = keywords.begin(); it != keywords.end(); ++it) |
| 1806 | { |
| 1807 | PyDict_SetItemString(kwargs, it->first.c_str(), PyString_FromString(it->second.c_str())); |
| 1808 | } |
| 1809 | |
| 1810 | |
| 1811 | PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_tick_params, args, kwargs); |
| 1812 | |
| 1813 | Py_DECREF(args); |
| 1814 | Py_DECREF(kwargs); |
| 1815 | if (!res) throw std::runtime_error("Call to tick_params() failed"); |
| 1816 | |
| 1817 | Py_DECREF(res); |
| 1818 | } |
| 1819 | |
| 1820 | inline void subplot(long nrows, long ncols, long plot_number) |
| 1821 | { |
nothing calls this directly
no outgoing calls
no test coverage detected