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

Function main

examples/line_plot/plot/plot_11.cpp:4–20  ·  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 double r = 2;
8 double xc = 4;
9 double yc = 3;
10 std::vector<double> theta = linspace(0, 2 * pi);
11 std::vector<double> x =
12 transform(theta, [=](auto theta) { return r * cos(theta) + xc; });
13 std::vector<double> y =
14 transform(theta, [=](auto theta) { return r * sin(theta) + yc; });
15 plot(x, y);
16 axis(equal);
17
18 show();
19 return 0;
20}

Callers

nothing calls this directly

Calls 5

linspaceFunction · 0.85
transformFunction · 0.85
axisFunction · 0.85
showFunction · 0.85
plotFunction · 0.50

Tested by

no test coverage detected