iowatcher: Fine tune the ticks
authorChris Mason <chris.mason@fusionio.com>
Tue, 24 Sep 2013 19:30:35 +0000 (15:30 -0400)
committerChris Mason <clm@fb.com>
Wed, 24 Sep 2014 19:02:08 +0000 (12:02 -0700)
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
iowatcher/main.c
iowatcher/plot.c

index d23e3b25f03d73d5045b10c767a4bb93c79a5e94..a4193241281ca07ca01244712917b50b2f1efd3a 100644 (file)
@@ -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;
index d486f293fc2bdf3103853c11346568cca2fa2c39..6d652ddcaba4811aae62860cbdd6829e5a9f97b9 100644 (file)
@@ -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++) {