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

Function gnpu

source/matplot/util/colors.cpp:473–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471 return result;
472 }
473 std::vector<std::vector<double>> gnpu(size_t n) {
474 static std::vector<std::vector<double>> map = {
475 {0.223529, 0.388235, 0.32549}, {0.0509804, 0.694118, 0.294118},
476 {0.427451, 0.752941, 0.403922}, {0.670588, 0.839216, 0.607843},
477 {0.854902, 0.917647, 0.756863}, {0.87451, 0.8, 0.894118},
478 {0.780392, 0.698039, 0.839216}, {0.580392, 0.454902, 0.705882},
479 {0.458824, 0.25098, 0.596078}, {0.313726, 0.286275, 0.443137}};
480 if (n == 10) {
481 return map;
482 }
483 std::vector<std::vector<double>> result;
484 for (size_t i = 0; i < n; ++i) {
485 std::array<float, 4> ac =
486 colormap_interpolation(static_cast<double>(i), 0.,
487 static_cast<double>(n - 1), map);
488 std::vector<double> vc = {ac[1], ac[2], ac[3]};
489 result.emplace_back(vc);
490 }
491 return result;
492 }
493 std::vector<std::vector<double>> greens(size_t n) {
494 static std::vector<std::vector<double>> map = {
495 {0.968627, 0.988235, 0.960784}, {0.898039, 0.960784, 0.878431},

Callers

nothing calls this directly

Calls 1

colormap_interpolationFunction · 0.85

Tested by

no test coverage detected