GladkyMS 1 год назад
Родитель f32bc01b85
Сommit 7d912af179

@ -45,7 +45,9 @@ void show_histogram_svg(const std::vector<size_t>& bins, size_t bin_count) {
svg_begin(IMAGE_WIDTH, IMAGE_HEIGHT);
double top = 0;
for (size_t bin : bins) {
std::string color = "#" + std::to_string(bin*100);
int key = (10 - floor((bin) * 9 / mxbins));
std::string color = "#" +std::to_string(key)+ std::to_string(key)+ std::to_string(key);
const double bin_width = BLOCK_WIDTH * bin*k;
svg_text(TEXT_LEFT, top + TEXT_BASELINE, std::to_string(bin));
svg_rect(TEXT_WIDTH, top, bin_width, BIN_HEIGHT,color,color);

Загрузка…
Отмена
Сохранить