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

Function dark2

source/matplot/util/colors.cpp:427–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425 return result;
426 }
427 std::vector<std::vector<double>> dark2(size_t n) {
428 static std::vector<std::vector<double>> map = {
429 {0.105882, 0.619608, 0.466667},
430 {0.85098, 0.372549, 0.00784314},
431 {0.458824, 0.439216, 0.701961},
432 {0.905882, 0.160784, 0.541176},
433 {0.4, 0.65098, 0.117647},
434 {0.901961, 0.670588, 0.00784314},
435 {0.65098, 0.462745, 0.113725},
436 {0.4, 0.4, 0.4}};
437 if (n == 8) {
438 return map;
439 }
440 std::vector<std::vector<double>> result;
441 for (size_t i = 0; i < n; ++i) {
442 std::array<float, 4> ac =
443 colormap_interpolation(static_cast<double>(i), 0.,
444 static_cast<double>(n - 1), map);
445 std::vector<double> vc = {ac[1], ac[2], ac[3]};
446 result.emplace_back(vc);
447 }
448 return result;
449 }
450 std::vector<std::vector<double>> gnbu(size_t n) {
451 static std::vector<std::vector<double>> map = {
452 {0.968627, 0.988235, 0.941176},

Callers

nothing calls this directly

Calls 1

colormap_interpolationFunction · 0.85

Tested by

no test coverage detected