7#include <matplotlibcpp17/axes.h>
8#include <matplotlibcpp17/common.h>
9#include <matplotlibcpp17/gridspec.h>
11#include <pybind11/pybind11.h>
13namespace matplotlibcpp17::figure {
20 Figure(
const pybind11::object &figure) {
24 Figure(pybind11::object &&figure) {
25 self = std::move(figure);
29 axes::Axes add_axes(
const pybind11::tuple &args = pybind11::tuple(),
30 const pybind11::dict &kwargs = pybind11::dict());
34 add_gridspec(
int nrow,
int ncol,
35 const pybind11::dict &kwargs = pybind11::dict());
38 axes::Axes add_subplot(
const pybind11::tuple &args = pybind11::tuple(),
39 const pybind11::dict &kwargs = pybind11::dict());
42 ObjectWrapper align_labels(
const pybind11::tuple &args = pybind11::tuple(),
43 const pybind11::dict &kwargs = pybind11::dict());
46 ObjectWrapper colorbar(
const pybind11::tuple &args = pybind11::tuple(),
47 const pybind11::dict &kwargs = pybind11::dict());
50 ObjectWrapper savefig(
const pybind11::tuple &args = pybind11::tuple(),
51 const pybind11::dict &kwargs = pybind11::dict());
54 ObjectWrapper suptitle(
const pybind11::tuple &args = pybind11::tuple(),
55 const pybind11::dict &kwargs = pybind11::dict());
58 ObjectWrapper tight_layout(
const pybind11::tuple &args = pybind11::tuple(),
59 const pybind11::dict &kwargs = pybind11::dict());
63 LOAD_FUNC_ATTR(add_axes,
self);
64 LOAD_FUNC_ATTR(add_gridspec,
self);
65 LOAD_FUNC_ATTR(add_subplot,
self);
66 LOAD_FUNC_ATTR(align_labels,
self);
67 LOAD_FUNC_ATTR(colorbar,
self);
68 LOAD_FUNC_ATTR(savefig,
self);
69 LOAD_FUNC_ATTR(suptitle,
self);
70 LOAD_FUNC_ATTR(tight_layout,
self);
72 pybind11::object add_axes_attr;
73 pybind11::object add_gridspec_attr;
74 pybind11::object add_subplot_attr;
75 pybind11::object align_labels_attr;
76 pybind11::object colorbar_attr;
77 pybind11::object savefig_attr;
78 pybind11::object suptitle_attr;
79 pybind11::object tight_layout_attr;
83inline axes::Axes Figure::add_axes(
const pybind11::tuple &args,
84 const pybind11::dict &kwargs) {
85 pybind11::object obj = add_axes_attr(*args, **kwargs);
91 const pybind11::dict &kwargs) {
96inline axes::Axes Figure::add_subplot(
const pybind11::tuple &args,
97 const pybind11::dict &kwargs) {
98 pybind11::object obj = add_subplot_attr(*args, **kwargs);
99 return axes::Axes(obj);
103inline ObjectWrapper Figure::align_labels(
const pybind11::tuple &args,
104 const pybind11::dict &kwargs) {
105 pybind11::object ret = align_labels_attr(*args, **kwargs);
106 return ObjectWrapper(std::move(ret));
110inline ObjectWrapper Figure::colorbar(
const pybind11::tuple &args,
111 const pybind11::dict &kwargs) {
112 pybind11::object ret = colorbar_attr(*args, **kwargs);
113 return ObjectWrapper(std::move(ret));
117inline ObjectWrapper Figure::savefig(
const pybind11::tuple &args,
118 const pybind11::dict &kwargs) {
119 pybind11::object ret = savefig_attr(*args, **kwargs);
120 return ObjectWrapper(std::move(ret));
124inline ObjectWrapper Figure::suptitle(
const pybind11::tuple &args,
125 const pybind11::dict &kwargs) {
126 pybind11::object ret = suptitle_attr(*args, **kwargs);
127 return ObjectWrapper(std::move(ret));
131inline ObjectWrapper Figure::tight_layout(
const pybind11::tuple &args,
132 const pybind11::dict &kwargs) {
133 pybind11::object ret = tight_layout_attr(*args, **kwargs);
134 return ObjectWrapper(std::move(ret));
A base class for python wrapper classes.
Definition: common.h:39
A proxy class for pybind object.
Definition: common.h:50
A wrapper class for matplotlib.axes.Axes.
Definition: axes.h:30
A wrapper class for matplotlib.gridspec.GridSpec.
Definition: gridspec.h:25