Skip to content
Snippets Groups Projects
Commit d087703a authored by soblin's avatar soblin
Browse files

switch AxesSubplot/Axes3D by checking props like plot_surface

parent 51dce98e
No related branches found
No related tags found
No related merge requests found
......@@ -28,12 +28,12 @@ endfunction()
if(${ADD_DEMO})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -g -DUSE_GUI=${USE_GUI}")
# add_subdirectory(gallery/lines_bars_and_markers)
# add_subdirectory(gallery/subplots_axes_and_figures)
# add_subdirectory(gallery/statistics)
# add_subdirectory(gallery/images_contours_and_fields)
# add_subdirectory(gallery/shapes_and_collections)
# add_subdirectory(gallery/artist_animation)
add_subdirectory(gallery/lines_bars_and_markers)
add_subdirectory(gallery/subplots_axes_and_figures)
add_subdirectory(gallery/statistics)
add_subdirectory(gallery/images_contours_and_fields)
add_subdirectory(gallery/shapes_and_collections)
add_subdirectory(gallery/artist_animation)
add_subdirectory(gallery/mplot3d)
endif()
......
......
......@@ -12,6 +12,7 @@ It is supposed to provide the user with almost full access to matplotlib feature
- pybind11(https://github.com/pybind/pybind11) >= 2.9.0
- compatible with matplotlib(https://matplotlib.org/stable/index.html) == 3.5.1 as of now
- numpy(only for 3D-plotting)
## Usage
......
......
......@@ -29,7 +29,6 @@ public:
private:
void load_attrs() { LOAD_FUNC_ATTR(save, self); }
pybind11::object self;
pybind11::object save_attr;
};
......
......
......@@ -222,8 +222,14 @@ private:
LOAD_FUNC_ATTR(invert_yaxis, self);
LOAD_FUNC_ATTR(legend, self);
LOAD_FUNC_ATTR(plot, self);
LOAD_FUNC_ATTR(plot_surface, self);
LOAD_FUNC_ATTR(plot_wireframe, self);
// NOTE: only when called with projection='3d', `plot_surface`, `plot_wireframe`, `set_zlabel` prop exists.
try {
plot_surface_attr = self.attr("plot_surface");
plot_wireframe_attr = self.attr("plot_wireframe");
set_zlabel_attr = self.attr("set_zlabel");
std::cout << "Loaded Axes3D." << std::endl;
}
catch(...) {}
LOAD_FUNC_ATTR(quiver, self);
LOAD_FUNC_ATTR(quiverkey, self);
LOAD_FUNC_ATTR(scatter, self);
......@@ -237,7 +243,6 @@ private:
LOAD_FUNC_ATTR(set_ylabel, self);
LOAD_FUNC_ATTR(set_ylim, self);
LOAD_FUNC_ATTR(set_yticks, self);
LOAD_FUNC_ATTR(set_zlabel, self);
LOAD_FUNC_ATTR(text, self);
LOAD_FUNC_ATTR(tick_params, self);
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment