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

Function main

examples/line_plot/errorbar/errorbar_7.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 std::vector<double> x = iota(0, 10, 100);
8 std::vector<double> y = {20, 30, 45, 40, 60, 65, 80, 75, 95, 90};
9 std::vector<double> yneg = {1, 3, 5, 3, 5, 3, 6, 4, 3, 3};
10 std::vector<double> ypos = {2, 5, 3, 5, 2, 5, 2, 2, 5, 5};
11 std::vector<double> xneg = {1, 3, 5, 3, 5, 3, 6, 4, 3, 3};
12 std::vector<double> xpos = {2, 5, 3, 5, 2, 5, 2, 2, 5, 5};
13
14 errorbar(x, y, yneg, ypos, xneg, xpos, "o");
15 axis({0, 100, 0, 100});
16
17 show();
18 return 0;
19}

Callers

nothing calls this directly

Calls 4

iotaFunction · 0.85
axisFunction · 0.85
showFunction · 0.85
errorbarFunction · 0.50

Tested by

no test coverage detected