From 17c57fda8dfa3328b2af7923246bb9779313e0ad Mon Sep 17 00:00:00 2001 From: Danila Date: Mon, 24 Apr 2023 02:47:40 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B8=D0=BD=D0=B4=D0=B8=D0=B2=D0=B8?= =?UTF-8?q?=D0=B4=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=20=D0=B7=D0=B0=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20(=D0=B2=D0=B0=D1=80=D0=B8=D0=B0?= =?UTF-8?q?=D0=BD=D1=82=205)=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/svg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }