diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-01 12:54:25 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-01 12:54:25 +0100 |
commit | 0e8394b016a039931a338fd59e103346a50f5329 (patch) | |
tree | 2cb23c836489769932eb29450bb6c1b0ecbc69a9 | |
parent | d293d53136fa7e6e7eda510847145edf4d3d7f55 (diff) | |
download | systemtap-steved-0e8394b016a039931a338fd59e103346a50f5329.tar.gz systemtap-steved-0e8394b016a039931a338fd59e103346a50f5329.tar.xz systemtap-steved-0e8394b016a039931a338fd59e103346a50f5329.zip |
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.
-rw-r--r-- | grapher/Graph.cxx | 2 | ||||
-rw-r--r-- | 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); |