我使用gnuplot
绘制从两个单独的CSV文件中的数据的交叉点(在https://drive.google.com/open?id=0B2Iv8dfU4fTUZGV6X1Bvb3c4TWs此链接找到)。gnuplot的两个曲线
这些数据似乎在两个csv
文件中没有共同的时间戳(第一列)和尚未gnuplot
似乎符合绘图如上所示。
这是我用来生成我的情节的gnuplot
脚本。
# ###### GNU Plot
set style data lines
set terminal postscript eps enhanced color "Times" 20
set output "output.eps"
set title "Actual vs. Estimated Comparison"
set style line 99 linetype 1 linecolor rgb "#999999" lw 2
#set border 1 back ls 11
set key right top
set key box linestyle 50
set key width -2
set xrange [0:10]
set key spacing 1.2
#set nokey
set grid xtics ytics mytics
#set size 2
#set size ratio 0.4
#show timestamp
set xlabel "Time [Seconds]"
set ylabel "Segments"
set style line 1 lc rgb "#ff0000" lt 1 pi 0 pt 4 lw 4 ps 0
plot "estimated.csv" using ($1):2 with lines title "Estimated", "actual.csv" using ($1):2 with lines title "Actual";
是否有任何方法可以通过忽略绿色图上方的峰来打印(写入文件)这些图的交点值?我也试图做一个sql连接查询,但它似乎没有打印出任何出于上述解释相同的原因。如果蓝线不接触绿线(即,如果它低于绿线),我想采用最接近绿线的值,这样它就成为一对一的线,与实际数据集一致(或非常接近)。
除非我很错误的是,Gnuplot是这项工作的错误工具。这是一个不用于数据操作或处理的程序。你想要一个通用的编程语言。 – Wrzlprmft
你能否详细说明你的意思是“交错的情节”?你想保留“紫色数据”,只收获“绿色数据”之上的内容? – ewcz
我的意思是粉红色线条和绿色线条相同(或接近相同),你可以从上面的图中看到它。 –