summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof8
1 files changed, 4 insertions, 4 deletions
diff --git a/gpsprof b/gpsprof
index 981fc566..ce3d85cb 100755
--- a/gpsprof
+++ b/gpsprof
@@ -335,15 +335,15 @@ if __name__ == '__main__':
plotter.collect(verbose)
# Save the raw data for post-analysis if required.
if dumpfile:
- with open(dumpfile) as fp:
+ with open(dumpfile, "w") as fp:
fp.write(plotter.dump())
# Ship the plot to standard output
+ if not title:
+ title = plotter.whatami()
if terminal:
sys.stdout.write("set terminal %s\n" % terminal)
+ sys.stdout.write("set title \"%s\"\n" % title)
sys.stdout.write(plotter.plot())
- if not title:
- title = plotter.whatami()
- sys.stdout.write("set title %s\n" % title)
except KeyboardInterrupt:
pass