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

Function main

examples/line_plot/plot/plot_7.cpp:4–16  ·  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 = linspace(0, 10, 150);
8 std::vector<double> y = transform(x, [](auto x) { return cos(5 * x); });
9 plot(x, y)->color({0.f, 0.7f, 0.9f});
10 title("2-D Line Plot");
11 xlabel("x");
12 ylabel("cos(5x)");
13
14 show();
15 return 0;
16}

Callers

nothing calls this directly

Calls 8

linspaceFunction · 0.85
transformFunction · 0.85
xlabelFunction · 0.85
ylabelFunction · 0.85
showFunction · 0.85
plotFunction · 0.50
titleFunction · 0.50
colorMethod · 0.45

Tested by

no test coverage detected