1
我很難過。我有一個秒列(在文件開始0秒)的CSV文件,另一列與日期(mm/dd/yyyy hh:mm
)與以下列包含數據。我正在繪製25 Hz的數據(絞車張力,支出),因此hh:mm
對於繪圖不夠精確,但我希望X軸仍然有mm/dd/yyyy hh:mm
。Gnuplot添加任意秒列到日期/時間列
我想不出一個優雅的方式來將日期列添加到日期/時間列,而沒有包含兩個x軸標籤。任何幫助?
這裏是我的數據的幾行:
0.2340004,6/3/2016 20:09:09,384.0,0.0,3.4,1083.0,54.0,21.8,67.0,0.0,-0.1,,,,,,
0.2808005,6/3/2016 20:09:09,389.0,0.0,3.4,1110.0,54.0,21.9,67.0,0.0,-0.1,,,,,,
0.3276006,6/3/2016 20:09:10,397.0,0.0,3.4,1129.0,54.0,21.9,67.0,0.0,-0.1,,,,,,
0.3744007,6/3/2016 20:09:10,398.0,0.0,3.4,1149.0,54.0,21.9,67.0,0.0,-0.1,,,,,,
和代碼:
set datafile separator ","
set terminal wxt 0
set grid
set ls 1 lc rgb "blue"
set ls 2 lc rgb "green"
set ls 3 lc rgb "red"
set ytics nomirror
set y2tics nomirror
set xdata time
set timefmt "%m/%d/%Y %H:%M"
set format x "%m/%d/%y\n%H:%M"
set xtics rotate by -270
set key outside above left vert Right\
noreverse enhanced autotitle box
set ylabel "Tension (lbs)"
set y2label "Wire Out (meters)"
set yrange [-300:2200] #change to set y range
set y2range [0:*] #change to set y range
plot 'WinchDAC-6-4-2016 07-38-56#3.csv' skip 11 using 2:9 w l t 'CTD Winch Tension' ls 1 axes x1y1,\
'' skip 11 using 2:11 w l t 'Wire Out' ls 2 axes x1y2,\
(x = 2000) axes x1y1 t 'SWL 0.032" (2,000 lbs)' ls 3
謝謝!
這工作。非常感謝你。 –