gfio: kill ge on widget destroy
[fio.git] / graph.c
diff --git a/graph.c b/graph.c
index 7dbfd357bde0b0296501897a3096df8a0a6c9799..837211dacebdb4f47defcc6e5b02ce9149c0b25c 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -525,6 +525,15 @@ void line_graph_draw(struct graph *g, cairo_t *cr)
        minx = find_xy_value(g, getx, mindouble);
        maxx = find_xy_value(g, getx, maxdouble);
        miny = find_xy_value(g, gety, mindouble);
+
+       /*
+        * Start graphs at zero, unless we have a value below. Otherwise
+        * it's hard to visually compare the read and write graph, since
+        * the lowest valued one will be the floor of the graph view.
+        */
+       if (miny > 0)
+               miny = 0;
+
        maxy = find_xy_value(g, gety, maxdouble);
 
        if (fabs(maxx - minx) < 1e-20 || fabs(maxy - miny) < 1e-20) {