7#include <matplotlibcpp17/common.h>
9#include <pybind11/pybind11.h>
11namespace matplotlibcpp17::gridspec {
18 SubplotSpec(
const pybind11::object &subplotspec) {
self = subplotspec; }
19 SubplotSpec(pybind11::object &&subplotspec) {
self = std::move(subplotspec); }
28 const pybind11::dict &kwargs = pybind11::dict()) {
32 pybind11::module::import(
"matplotlib.gridspec").attr(
"GridSpec");
33 self = gridspec_attr(nrow, ncol, **kwargs);
35 template <
typename Rows,
typename Cols>
36 SubplotSpec operator()(
const Rows &r,
const Cols &c) {
37 pybind11::object obj =
self[pybind11::make_tuple(r, c)];
43 pybind11::object gridspec_attr;
A base class for python wrapper classes.
Definition: common.h:39
A wrapper class for matplotlib.gridspec.GridSpec.
Definition: gridspec.h:25
A wrapper class for matplotlib.gridspec.SubplotSpec.
Definition: gridspec.h:16