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

Function main

examples/annotations/text/text_7.cpp:4–17  ·  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 auto x = linspace(-5, +5);
8 auto y = transform(x, [](double x) { return pow(x, 3) - 12 * x; });
9 plot(x, y);
10 auto t = text({-2, 2}, {16, -16}, "dy/dx=0");
11 t->colors({.0, 1.});
12 t->sizes({14, 10});
13 gca()->colormap({{1, 0, 0}, {0, 0, 0}});
14
15 show();
16 return 0;
17}

Callers

nothing calls this directly

Calls 7

linspaceFunction · 0.85
transformFunction · 0.85
gcaFunction · 0.85
showFunction · 0.85
colormapMethod · 0.80
plotFunction · 0.50
textFunction · 0.50

Tested by

no test coverage detected