| 2 | #include <matplot/matplot.h> |
| 3 | |
| 4 | int main() { |
| 5 | using namespace matplot; |
| 6 | |
| 7 | std::vector<double> x = linspace(0, 10, 10); |
| 8 | std::vector<double> y = transform(x, [](double x) { return sin(x / 2.); }); |
| 9 | std::vector<double> err(y.size(), 0.3); |
| 10 | |
| 11 | auto e = |
| 12 | errorbar(x, y, err)->cap_size(15).marker("*").marker_size(10).color( |
| 13 | "red"); |
| 14 | |
| 15 | show(); |
| 16 | return 0; |
| 17 | } |