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

Function main

examples/appearance/colormaps/rgbplot/rgbplot_2.cpp:3–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <matplot/matplot.h>
2
3int main() {
4 using namespace matplot;
5
6 auto r = iota(0, .1, .9);
7 auto g = transform(r, [](double r) { return pow(r, 1.8); });
8 auto b = transform(r, [](double r) { return pow(r, 2.1); });
9 vector_2d mymap_channels{r, g, b};
10 auto mymap = transpose(mymap_channels);
11
12 rgbplot(mymap);
13 hold(on);
14 colormap(mymap);
15 colorbar().tick_values({});
16
17 show();
18 return 0;
19}

Callers

nothing calls this directly

Calls 7

iotaFunction · 0.85
transformFunction · 0.85
transposeFunction · 0.85
holdFunction · 0.85
colormapFunction · 0.85
showFunction · 0.85
rgbplotFunction · 0.50

Tested by

no test coverage detected