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.
This commit is contained in:
2018-08-10 09:56:57 +02:00
parent 786570503a
commit 14d9216e40

View File

@@ -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 ");