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

Function gnbu

source/matplot/util/colors.cpp:450–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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},
453 {0.878431, 0.952941, 0.858824},
454 {0.8, 0.921569, 0.772549},
455 {0.658824, 0.866667, 0.709804},
456 {0.482353, 0.8, 0.768627},
457 {0.305882, 0.701961, 0.827451},
458 {0.168627, 0.54902, 0.745098},
459 {0.0313726, 0.345098, 0.619608}};
460 if (n == 8) {
461 return map;
462 }
463 std::vector<std::vector<double>> result;
464 for (size_t i = 0; i < n; ++i) {
465 std::array<float, 4> ac =
466 colormap_interpolation(static_cast<double>(i), 0.,
467 static_cast<double>(n - 1), map);
468 std::vector<double> vc = {ac[1], ac[2], ac[3]};
469 result.emplace_back(vc);
470 }
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},

Callers

nothing calls this directly

Calls 1

colormap_interpolationFunction · 0.85

Tested by

no test coverage detected