| 2 | #include <matplot/matplot.h> |
| 3 | |
| 4 | int main() { |
| 5 | using namespace matplot; |
| 6 | |
| 7 | std::vector<double> x = linspace(-2 * pi, 3); |
| 8 | std::vector<double> y1 = transform(x, [](auto x) { return sin(x); }); |
| 9 | std::vector<double> y2 = transform(x, [](auto x) { return cos(x); }); |
| 10 | auto p = plot(x, y1, x, y2); |
| 11 | p[0]->line_width(2); |
| 12 | p[1]->marker(line_spec::marker_style::asterisk); |
| 13 | |
| 14 | show(); |
| 15 | return 0; |
| 16 | } |