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

Function main

examples/line_plot/plot/plot_5.cpp:4–14  ·  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, 10);
8 std::vector<double> y = transform(x, [](auto x) { return sin(x); });
9 plot(x, y, "-o")->marker_indices({0, 5, 10, 15, 20, 25, 30, 35, 40, 45,
10 50, 55, 60, 65, 70, 75, 80, 85, 90, 95});
11
12 show();
13 return 0;
14}

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