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

Function main

examples/line_plot/plot3/plot3_8.cpp:4–25  ·  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 tiledlayout(1, 2);
7
8 auto ax1 = nexttile();
9 auto t = iota(0, pi / 20, 10 * pi);
10 auto xt1 = transform(t, [](auto t) { return sin(t); });
11 auto yt1 = transform(t, [](auto t) { return cos(t); });
12 plot3(ax1, xt1, yt1, t);
13 title(ax1, "Helix with 5 Turns");
14
15 auto ax2 = nexttile();
16 t = iota(0, pi / 40, 10 * pi);
17 auto xt2 = transform(t, [](auto t) { return sin(2 * t); });
18 auto yt2 = transform(t, [](auto t) { return cos(2 * t); });
19 plot3(ax2, xt2, yt2, t);
20 ax2->box(false);
21 title(ax2, "Helix with 10 Turns");
22
23 show();
24 return 0;
25}

Callers

nothing calls this directly

Calls 8

tiledlayoutFunction · 0.85
nexttileFunction · 0.85
iotaFunction · 0.85
transformFunction · 0.85
showFunction · 0.85
plot3Function · 0.50
titleFunction · 0.50
boxMethod · 0.45

Tested by

no test coverage detected