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

Function main

examples/line_plot/plot3/plot3_9.cpp:5–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <random>
4
5int main() {
6 using namespace matplot;
7
8 std::default_random_engine g(0);
9 std::uniform_real_distribution<double> d;
10
11 std::vector<double> x(10);
12 std::generate(x.begin(), x.end(), [&]() { return d(g); });
13
14 std::vector<double> y(10);
15 std::generate(y.begin(), y.end(), [&]() { return d(g); });
16
17 std::uniform_real_distribution<double> d2(0, 90);
18 std::vector<double> z(10);
19 std::generate(z.begin(), z.end(), [&]() { return d2(g); });
20
21 auto p = plot3(x, y, z, "o");
22 p->parent()->x_axis().tick_label_format("s");
23 xlabel("X");
24 ylabel("Y");
25 zlabel("Duration");
26 grid(on);
27
28 show();
29 return 0;
30}

Callers

nothing calls this directly

Calls 9

xlabelFunction · 0.85
ylabelFunction · 0.85
zlabelFunction · 0.85
gridFunction · 0.85
showFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
plot3Function · 0.50
parentMethod · 0.45

Tested by

no test coverage detected