From 14d9216e4011c0013f3c067a3021138dbf1919d3 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 10 Aug 2018 09:56:57 +0200 Subject: [PATCH] create margins with constant size With this we will be able to zoom in by selecting a region. The constant margins allow us to determine the exact timestampt for a pixel position. --- .../org/lucares/recommind/logs/GnuplotFileGenerator.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pdb-plotting/src/main/java/org/lucares/recommind/logs/GnuplotFileGenerator.java b/pdb-plotting/src/main/java/org/lucares/recommind/logs/GnuplotFileGenerator.java index ce91a8b..6b66c88 100644 --- a/pdb-plotting/src/main/java/org/lucares/recommind/logs/GnuplotFileGenerator.java +++ b/pdb-plotting/src/main/java/org/lucares/recommind/logs/GnuplotFileGenerator.java @@ -76,6 +76,14 @@ public class GnuplotFileGenerator { appendln(result, "set format y2 \"\""); appendln(result, "set nokey"); + } else if (!settings.isKeyOutside()) { + // make sure left and right margins are always the same + // this is need to be able to zoom in by selecting a region + // (horizontal: 1 unit = 10px; vertical: 1 unit = 19px) + appendln(result, "set lmargin 11"); // margin 11 -> 110px + appendln(result, "set rmargin 11"); // margin 11 -> 110px + appendln(result, "set tmargin 3"); // margin 3 -> 57px + appendln(result, "set bmargin 4"); // margin 4 -> 76 } appendf(result, "plot ");