Skip to content

Commit 779f108

Browse files
authored
Added axvline (#31)
* Added axvline * Added axvline Signed-off-by: Björnborg Nguyen <bjornborg.nguyen@chalmers.se> --------- Signed-off-by: Björnborg Nguyen <bjornborg.nguyen@chalmers.se>
1 parent 0368a24 commit 779f108

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/matplotlibcpp17/axes.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ struct DECL_STRUCT_ATTR Axes : public BaseWrapper {
5555
// axhline
5656
ObjectWrapper axhline(const pybind11::tuple &args = pybind11::tuple(),
5757
const pybind11::dict &kwargs = pybind11::dict());
58+
// axvline
59+
ObjectWrapper axvline(const pybind11::tuple &args = pybind11::tuple(),
60+
const pybind11::dict &kwargs = pybind11::dict());
5861

5962
// bar
6063
container::BarContainer bar(const pybind11::tuple &args = pybind11::tuple(),
@@ -256,6 +259,7 @@ struct DECL_STRUCT_ATTR Axes : public BaseWrapper {
256259
LOAD_FUNC_ATTR(add_collection, self);
257260
LOAD_FUNC_ATTR(add_patch, self);
258261
LOAD_FUNC_ATTR(axhline, self);
262+
LOAD_FUNC_ATTR(axvline, self);
259263
LOAD_FUNC_ATTR(bar, self);
260264
#if MATPLOTLIB_MINOR_VER_GTE_4
261265
LOAD_FUNC_ATTR(bar_label, self);
@@ -306,6 +310,7 @@ struct DECL_STRUCT_ATTR Axes : public BaseWrapper {
306310
pybind11::object add_collection_attr;
307311
pybind11::object add_patch_attr;
308312
pybind11::object axhline_attr;
313+
pybind11::object axvline_attr;
309314
pybind11::object bar_attr;
310315
pybind11::object bar_label_attr;
311316
pybind11::object barh_attr;
@@ -383,6 +388,13 @@ ObjectWrapper Axes::axhline(const pybind11::tuple &args,
383388
return ObjectWrapper(std::move(ret));
384389
}
385390

391+
// axvline
392+
ObjectWrapper Axes::axvline(const pybind11::tuple &args,
393+
const pybind11::dict &kwargs) {
394+
pybind11::object ret = axvline_attr(*args, **kwargs);
395+
return ObjectWrapper(std::move(ret));
396+
}
397+
386398
// bar
387399
container::BarContainer Axes::bar(const pybind11::tuple &args,
388400
const pybind11::dict &kwargs) {

0 commit comments

Comments
 (0)