Hello, can gnuplot draw a piecewise constant graph from a simple data file?
Here is an example: Let the data file be like the following:
Then I want a graph that is 0 on x \in [0,1), 1 on [1,2), and so on. Is
that possible in gnuplot without modifying the data file?
I guess it is possible to run a complicated series of command to filter
the data file as gnuplot reads it, but I'm would like to be able to do
something along the lines of:
plot "data.txt" using 1:2 blabla
where "blabla" is some setting that specifies that gnuplot should use a
piecewise constant "interpolation" between data points. In fact, one
should also be able to specify if any vertical lines should be visible
Right now I generate a modified data file to accomplish this (containing
additional data points):