#include #include int main() { using namespace matplot; std::vector x = linspace(-5, +5); std::vector y = transform(x, [](auto x) { return pow(x, 3) - 12 * x; }); plot(x, y); std::vector xt = {-2, +2}; std::vector yt = {16, -16}; std::string str = "dy/dx = 0"; text(xt, yt, str); show(); return 0; }