diff --git a/project/svg.cpp b/project/svg.cpp index 8ad2ba8..b58b16f 100644 --- a/project/svg.cpp +++ b/project/svg.cpp @@ -67,8 +67,8 @@ show_histogram_svg(const vector& bins) for (size_t bin : bins) { double bin_width = (MAX_WIDTH)*(bin/max_count); - svg_text(TEXT_LEFT, top + TEXT_BASELINE, to_string(bin)); - svg_rect(TEXT_WIDTH, top, bin_width, BIN_HEIGHT, BLACK, RED); + svg_rect(MAX_WIDTH-bin_width, top, bin_width, BIN_HEIGHT, BLACK, RED); + svg_text(TEXT_LEFT+MAX_WIDTH, top + TEXT_BASELINE, to_string(bin)); top += BIN_HEIGHT; }