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

Function main

examples/line_plot/plot/plot_6.cpp:4–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <set>
3
4int main() {
5 using namespace matplot;
6
7 std::vector<double> x = linspace(-pi, +pi, 20);
8 // test with set, just because...
9 std::set<double> x2(x.begin(), x.end());
10
11 std::vector<double> y =
12 transform(x, [](auto x) { return tan(sin(x)) - sin(tan(x)); });
13 plot(x2, y, "--gs")
14 ->line_width(2)
15 .marker_size(10)
16 .marker_color("b")
17 .marker_face_color({.5, .5, .5});
18
19 show();
20 return 0;
21}

Callers

nothing calls this directly

Calls 10

linspaceFunction · 0.85
transformFunction · 0.85
showFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
marker_face_colorMethod · 0.80
marker_colorMethod · 0.80
plotFunction · 0.50
marker_sizeMethod · 0.45
line_widthMethod · 0.45

Tested by

no test coverage detected