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

Function main

examples/annotations/rectangle/rectangle_1.cpp:4–19  ·  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 vector_1d data = {2, 4, 6, 7, 8, 7, 5, 2};
8 stem(data);
9
10 auto r1 = rectangle(2.5, 5.5, 2, 2);
11 r1->color("red");
12
13 auto r2 = rectangle(6.5, 4.5, 1, 1);
14 r2->fill(true);
15 r2->color({0.8f, 0.f, 0.f, 1.f});
16
17 show();
18 return 0;
19}

Callers

nothing calls this directly

Calls 5

rectangleFunction · 0.85
showFunction · 0.85
stemFunction · 0.50
colorMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected