| 1835 | } |
| 1836 | |
| 1837 | inline void subplot2grid(long nrows, long ncols, long rowid=0, long colid=0, long rowspan=1, long colspan=1) |
| 1838 | { |
| 1839 | detail::_interpreter::get(); |
| 1840 | |
| 1841 | PyObject* shape = PyTuple_New(2); |
| 1842 | PyTuple_SetItem(shape, 0, PyLong_FromLong(nrows)); |
| 1843 | PyTuple_SetItem(shape, 1, PyLong_FromLong(ncols)); |
| 1844 | |
| 1845 | PyObject* loc = PyTuple_New(2); |
| 1846 | PyTuple_SetItem(loc, 0, PyLong_FromLong(rowid)); |
| 1847 | PyTuple_SetItem(loc, 1, PyLong_FromLong(colid)); |
| 1848 | |
| 1849 | PyObject* args = PyTuple_New(4); |
| 1850 | PyTuple_SetItem(args, 0, shape); |
| 1851 | PyTuple_SetItem(args, 1, loc); |
| 1852 | PyTuple_SetItem(args, 2, PyLong_FromLong(rowspan)); |
| 1853 | PyTuple_SetItem(args, 3, PyLong_FromLong(colspan)); |
| 1854 | |
| 1855 | PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_subplot2grid, args); |
| 1856 | if(!res) throw std::runtime_error("Call to subplot2grid() failed."); |
| 1857 | |
| 1858 | Py_DECREF(shape); |
| 1859 | Py_DECREF(loc); |
| 1860 | Py_DECREF(args); |
| 1861 | Py_DECREF(res); |
| 1862 | } |
| 1863 | |
| 1864 | inline void title(const std::string &titlestr, const std::map<std::string, std::string> &keywords = {}) |
| 1865 | { |
nothing calls this directly
no outgoing calls
no test coverage detected