From 0e8394b016a039931a338fd59e103346a50f5329 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 1 Dec 2009 12:54:25 +0100 Subject: some aesthetic tweaks to the grapher * grapher/Graph.cxx (draw): Draw tick labels (times) below the graph. * grapher/grapher.cxx (main): Open main window with a size big enough to display an entire graph. --- grapher/Graph.cxx | 2 +- grapher/grapher.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index 61b7e55c..1d478790 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -212,7 +212,6 @@ namespace systemtap double x = (tickVal - _left) * horizScale + 20.0; cr->move_to(x, 0.0); cr->line_to(x, _graphHeight); - cr->move_to(x, _graphHeight - 5); std::ostringstream stream; stream << tickVal; Cairo::TextExtents extents; @@ -220,6 +219,7 @@ namespace systemtap // Room for this label? if (x + extents.x_bearing > prevTextAdvance) { + cr->move_to(x, _graphHeight + 5 + extents.height); cr->show_text(stream.str()); prevTextAdvance = x + extents.x_advance; } diff --git a/grapher/grapher.cxx b/grapher/grapher.cxx index fe9880b2..969bc762 100644 --- a/grapher/grapher.cxx +++ b/grapher/grapher.cxx @@ -437,7 +437,7 @@ int main(int argc, char** argv) GrapherWindow win; win.set_title("Grapher"); - win.set_default_size(600, 200); + win.set_default_size(600, 250); launcher.setWinParams(&win, &win.w); win.setGraphicalLauncher(&launcher); -- cgit