From: Chris Mason Date: Tue, 24 Sep 2013 19:30:35 +0000 (-0400) Subject: iowatcher: Fine tune the ticks X-Git-Tag: blktrace-1.1.0~2^2~18 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e4d4b5dc17dd1b2ec78e409efc8a36230772a377;p=blktrace.git iowatcher: Fine tune the ticks Signed-off-by: Chris Mason --- diff --git a/iowatcher/main.c b/iowatcher/main.c index d23e3b2..a419324 100644 --- a/iowatcher/main.c +++ b/iowatcher/main.c @@ -53,7 +53,7 @@ static int opt_graph_width = 0; static int opt_graph_height = 0; static int columns = 1; -static int num_xticks = 7; +static int num_xticks = 9; static int num_yticks = 4; static double min_time = 0; diff --git a/iowatcher/plot.c b/iowatcher/plot.c index d486f29..6d652dd 100644 --- a/iowatcher/plot.c +++ b/iowatcher/plot.c @@ -563,7 +563,7 @@ void set_xticks(struct plot *plot, int num_ticks, int first, int last) * We don't want last two ticks to be too close together so subtract * 20% of the step from the interval */ - num_ticks = (double)(last - first - step / 5) / step + 1; + num_ticks = (double)(last - first - step) / step + 1; pixels_per_tick = graph_width * step / (double)(last - first); for (i = 0; i < num_ticks; i++) {