draw tic for max value on y-axis only if it makes sense

This commit is contained in:
2019-08-25 15:40:20 +02:00
parent a905c608aa
commit 4f61d91c79

View File

@@ -208,10 +208,9 @@ public class GnuplotFileGenerator {
System.out.println("digits: " + digits);
final List<String> ticsLabels = new ArrayList<>();
for (long i = yRangeMin; i < yRangeMax; i += msPerLabel) {
for (long i = yRangeMin; i <= yRangeMax; i += msPerLabel) {
ticsLabels.add("\"" + msToTic(i, msPerLabel) + "\" " + i);
}
ticsLabels.add("\"" + msToTic(yRangeMax, msPerLabel) + "\" " + yRangeMax);
result.append("set ytics (");
result.append(String.join(", ", ticsLabels));