MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / main

Function main

examples/line_plot/plot/plot_4.cpp:4–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <matplot/matplot.h>
3
4int main() {
5 using namespace matplot;
6
7 std::vector<double> x = linspace(0, 2 * pi);
8 std::vector<double> y1 = transform(x, [](auto x) { return sin(x); });
9 std::vector<double> y2 = transform(x, [](auto x) { return sin(x - 0.25); });
10 std::vector<double> y3 = transform(x, [](auto x) { return sin(x - 0.5); });
11 plot(x, y1, "g", x, y2, "b--o", x, y3, "c*");
12
13 show();
14 return 0;
15}

Callers

nothing calls this directly

Calls 4

linspaceFunction · 0.85
transformFunction · 0.85
showFunction · 0.85
plotFunction · 0.50

Tested by

no test coverage detected