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

Function blues

source/matplot/util/colors.cpp:319–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 return result;
318 }
319 std::vector<std::vector<double>> blues(size_t n) {
320 static std::vector<std::vector<double>> map = {
321 {0.968627, 0.984314, 1},
322 {0.870588, 0.921569, 0.968627},
323 {0.776471, 0.858824, 0.937255},
324 {0.619608, 0.792157, 0.882353},
325 {0.419608, 0.682353, 0.839216},
326 {0.258824, 0.572549, 0.776471},
327 {0.129412, 0.443137, 0.709804},
328 {0.0313726, 0.270588, 0.580392}};
329 if (n == 8) {
330 return map;
331 }
332 std::vector<std::vector<double>> result;
333 for (size_t i = 0; i < n; ++i) {
334 std::array<float, 4> ac =
335 colormap_interpolation(static_cast<double>(i), 0.,
336 static_cast<double>(n - 1), map);
337 std::vector<double> vc = {ac[1], ac[2], ac[3]};
338 result.emplace_back(vc);
339 }
340 return result;
341 }
342 std::vector<std::vector<double>> brbg(size_t n) {
343 static std::vector<std::vector<double>> map = {
344 {0.54902, 0.317647, 0.0392157}, {0.74902, 0.505882, 0.176471},

Callers 3

binscatterMethod · 0.85
heatmapMethod · 0.85
mainFunction · 0.85

Calls 1

colormap_interpolationFunction · 0.85

Tested by

no test coverage detected