然后通过如下方式进行调用: #define __USE_MATH_DEFINES#include <cmath>#include <Eigen/Dense># include <windows.h>#include "matplotlibcpp.h"namespace plt = matplotlibcpp; void waves(const unsigned n) { Eigen::MatrixXd X(n, n); for (unsigned i = 0; i < n; ++i) { for (unsigned j...
Eigen::MatrixXd X(n, n); for (unsigned i = 0; i < n; ++i) { for (unsigned j = 0; j < n; ++j) { X(i, j) = sin(3.0 * 3.14 * i / n) * cos(20.0 * 3.14 * j / n); } } plt::figure(); plt::imshow(X, { {"cmap", "Spectral"} }); plt::colorbar(); pl...
Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib - matplotlib-cpp/matplotlibcpp.h at master · lava/matplotlib-cpp
Mar 28, 2020 implement colorbar; requires returned PyObject of mappable object 102 PyObject *s_python_function_colorbar; Jan 12, 2019 Add bar plot and subplots_adjust 103 PyObject *s_python_function_subplots_adjust; Mar 26, 2021 Add 3D scatter plots, allow more than one 3d plot on the...