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

Function main

examples/line_plot/plot/plot_10.cpp:4–16  ·  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(-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}

Callers

nothing calls this directly

Calls 6

linspaceFunction · 0.85
transformFunction · 0.85
showFunction · 0.85
plotFunction · 0.50
line_widthMethod · 0.45
markerMethod · 0.45

Tested by

no test coverage detected