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

Function main

examples/appearance/multiplot/subplot/subplot_3.cpp:7–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <vector>
6
7int main() {
8 using namespace matplot;
9
10 auto ax1 = subplot(2, 2, 0);
11 fplot("cos(x)");
12 title("Subplot 1: Cosine");
13
14 auto ax2 = subplot(2, 2, 1);
15 fplot("1 - x**2/2 + x**4/24");
16 title("Subplot 2: Polynomial");
17
18 auto ax3 = subplot(2, 2, {2, 3});
19 fplot("cos(x)", "b");
20 hold(on);
21 fplot("1 - x**2/2 + x**4/24", "g");
22 title("Subplot 3 and 4: Both");
23
24 axis({ax1, ax2, ax3}, {-4, 4, inf, inf});
25
26 show();
27 return 0;
28}

Callers

nothing calls this directly

Calls 6

subplotFunction · 0.85
fplotFunction · 0.85
holdFunction · 0.85
axisFunction · 0.85
showFunction · 0.85
titleFunction · 0.50

Tested by

no test coverage detected