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

Function paired

source/matplot/util/colors.cpp:1043–1061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1041 return result;
1042 }
1043 std::vector<std::vector<double>> paired(size_t n) {
1044 static std::vector<std::vector<double>> map = {
1045 {0.65098, 0.807843, 0.890196}, {0.121569, 0.470588, 0.705882},
1046 {0.698039, 0.87451, 0.541176}, {0.2, 0.627451, 0.172549},
1047 {0.984314, 0.603922, 0.6}, {0.890196, 0.101961, 0.109804},
1048 {0.992157, 0.74902, 0.435294}, {1, 0.498039, 0}};
1049 if (n == 8) {
1050 return map;
1051 }
1052 std::vector<std::vector<double>> result;
1053 for (size_t i = 0; i < n; ++i) {
1054 std::array<float, 4> ac =
1055 colormap_interpolation(static_cast<double>(i), 0.,
1056 static_cast<double>(n - 1), map);
1057 std::vector<double> vc = {ac[1], ac[2], ac[3]};
1058 result.emplace_back(vc);
1059 }
1060 return result;
1061 }
1062 std::vector<std::vector<double>> parula(size_t n) {
1063 static std::vector<std::vector<double>> map = {
1064 {0.2422, 0.1504, 0.6603},

Callers 2

parallelplotMethod · 0.85
mainFunction · 0.85

Calls 1

colormap_interpolationFunction · 0.85

Tested by

no test coverage detected