add marker line for 60s threshold
In logarithmic plots it is not easy to spot which event are longer than 60 seconds. A thin grey line help with this. Also: fixed the marker lines (zoom area) which broke when y-ranges were introduced. The lines were not drawn correctly, when the y-axis offset was greater than 0. Gnuplot supports differen coordinate systems. 'graph' is relative to the area within the axes, 0,0 is bottom left and 1,1 is top right. And 'first' is based on the values of the x1 axis. By using "graph 0.25,0" we say that the starting point is 25% of the x-axis and 0% of the y-axis without having to compute the exact values.
This commit is contained in:
@@ -53,12 +53,11 @@ public class GnuplotFileGenerator {
|
||||
appendfln(result, "set output \"%s\"", settings.getOutput().toAbsolutePath().toString().replace("\\", "/"));
|
||||
|
||||
// marker lines that show which area will be zoomed
|
||||
final long minDate = Long.parseLong(settings.getxAxisSettings().getFrom());
|
||||
final long maxDate = Long.parseLong(settings.getxAxisSettings().getTo());
|
||||
appendfln(result, "set arrow from " + (minDate + (maxDate - minDate) * 0.25) + "," + graphOffset
|
||||
+ " rto graph 0,1 lt 3 lc rgb \"#EEEEEE\" nohead");
|
||||
appendfln(result, "set arrow from " + (minDate + (maxDate - minDate) * 0.75) + "," + graphOffset
|
||||
+ " rto graph 0,1 lc rgb \"#EEEEEE\" nohead");
|
||||
appendfln(result, "set arrow from graph 0.25,0 rto graph 0,1 lc rgb \"#EEEEEE\" nohead");
|
||||
appendfln(result, "set arrow from graph 0.75,0 rto graph 0,1 lc rgb \"#EEEEEE\" nohead");
|
||||
|
||||
// marker line for the 60 second threshold
|
||||
appendfln(result, "set arrow from graph 0, first 60000 rto graph 1,0 lc rgb \"#EEEEEE\" nohead");
|
||||
|
||||
if (settings.isKeyOutside()) {
|
||||
appendfln(result, "set key outside");
|
||||
|
||||
Reference in New Issue
Block a user