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

Function bupu

source/matplot/util/colors.cpp:380–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378 return result;
379 }
380 std::vector<std::vector<double>> bupu(size_t n) {
381 static std::vector<std::vector<double>> map = {
382 {0.968627, 0.988235, 0.992157},
383 {0.878431, 0.92549, 0.956863},
384 {0.74902, 0.827451, 0.901961},
385 {0.619608, 0.737255, 0.854902},
386 {0.54902, 0.588235, 0.776471},
387 {0.54902, 0.419608, 0.694118},
388 {0.533333, 0.254902, 0.615686},
389 {0.431373, 0.00392157, 0.419608}};
390 if (n == 8) {
391 return map;
392 }
393 std::vector<std::vector<double>> result;
394 for (size_t i = 0; i < n; ++i) {
395 std::array<float, 4> ac =
396 colormap_interpolation(static_cast<double>(i), 0.,
397 static_cast<double>(n - 1), map);
398 std::vector<double> vc = {ac[1], ac[2], ac[3]};
399 result.emplace_back(vc);
400 }
401 return result;
402 }
403 std::vector<std::vector<double>> chromajs(size_t n) {
404 static std::vector<std::vector<double>> map = {
405 {1, 1, 0.878431},

Callers

nothing calls this directly

Calls 1

colormap_interpolationFunction · 0.85

Tested by

no test coverage detected