Skip to content

Commit

Permalink
Added axvline (#31)
Browse files Browse the repository at this point in the history
* Added axvline

* Added axvline

Signed-off-by: Björnborg Nguyen <[email protected]>

---------

Signed-off-by: Björnborg Nguyen <[email protected]>
  • Loading branch information
bjornborg authored Jun 14, 2023
1 parent 0368a24 commit 779f108
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/matplotlibcpp17/axes.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ struct DECL_STRUCT_ATTR Axes : public BaseWrapper {
// axhline
ObjectWrapper axhline(const pybind11::tuple &args = pybind11::tuple(),
const pybind11::dict &kwargs = pybind11::dict());
// axvline
ObjectWrapper axvline(const pybind11::tuple &args = pybind11::tuple(),
const pybind11::dict &kwargs = pybind11::dict());

// bar
container::BarContainer bar(const pybind11::tuple &args = pybind11::tuple(),
Expand Down Expand Up @@ -256,6 +259,7 @@ struct DECL_STRUCT_ATTR Axes : public BaseWrapper {
LOAD_FUNC_ATTR(add_collection, self);
LOAD_FUNC_ATTR(add_patch, self);
LOAD_FUNC_ATTR(axhline, self);
LOAD_FUNC_ATTR(axvline, self);
LOAD_FUNC_ATTR(bar, self);
#if MATPLOTLIB_MINOR_VER_GTE_4
LOAD_FUNC_ATTR(bar_label, self);
Expand Down Expand Up @@ -306,6 +310,7 @@ struct DECL_STRUCT_ATTR Axes : public BaseWrapper {
pybind11::object add_collection_attr;
pybind11::object add_patch_attr;
pybind11::object axhline_attr;
pybind11::object axvline_attr;
pybind11::object bar_attr;
pybind11::object bar_label_attr;
pybind11::object barh_attr;
Expand Down Expand Up @@ -383,6 +388,13 @@ ObjectWrapper Axes::axhline(const pybind11::tuple &args,
return ObjectWrapper(std::move(ret));
}

// axvline
ObjectWrapper Axes::axvline(const pybind11::tuple &args,
const pybind11::dict &kwargs) {
pybind11::object ret = axvline_attr(*args, **kwargs);
return ObjectWrapper(std::move(ret));
}

// bar
container::BarContainer Axes::bar(const pybind11::tuple &args,
const pybind11::dict &kwargs) {
Expand Down

0 comments on commit 779f108

Please sign in to comment.