| 2 | #include <matplot/matplot.h> |
| 3 | |
| 4 | int main() { |
| 5 | using namespace matplot; |
| 6 | |
| 7 | std::vector<double> x = iota(0, pi / 20, 2 * pi); |
| 8 | std::vector<double> y = transform(x, [](auto x) { return sin(x); }); |
| 9 | plot(x, y); |
| 10 | text(pi, 0, "← sin(π)"); |
| 11 | |
| 12 | show(); |
| 13 | return 0; |
| 14 | } |