Reputation: 1235
In Gnuplot, is it possible to plot something like this? Bars, which start at a point from one column, and end at a point from another column?
Given this sample data, for example:
set datafile separator "/"
$Z <<EOD
2017-08-11 07:00/12/32/65
2017-08-12 06:52/13/36/62
2017-08-13 08:08/11/31/63
2017-08-13 23:04/12/39/56
2017-08-14 07:28/12/31/58
2017-08-15 06:59/10/36/65
2017-08-15 23:55/12/33/56
2017-08-16 08:33/12/37/63
2017-08-16 23:13/14/39/70
2017-08-17 07:47/11/31/58
EOD
Upvotes: 0
Views: 45
Reputation: 15093
Several ways, depending on exactly what you mean by "bars"
set xdata time
set timefmt "%Y-%m-%d %H:%M"
set yrange [0:100]
# Thick lines as "bars"
plot $Z using 1:3:(0):($4-$3) with vectors nohead lw 6
# boxes of width 2 hour ( +/- 3600 seconds)
set style fill solid 0.5 border lc "black"
plot $Z using 1:3:(timecolumn(1)-3600.):(timecolumn(1) + 3600.):3:4 with boxxy
Upvotes: 1