【发布时间】:2014-11-08 15:12:47
【问题描述】:
我有以下代码,它绘制了 4 行:
plot for [i=1:4] \
path_to_file using 1:(column(i)) , \
我还想在这张图上绘制 8 条水平线,其值来自 mydata.txt。
我从Gnuplot: How to load and display single numeric value from data file的回答中看到,我可以使用stats命令访问我感兴趣的常量值。我想我可以访问单元格(行,列)如下:
stats 'mydata.txt' every ::row::row using col nooutput
value = int(STATS_min)
但它们的位置是 i 的函数。因此,在 plot 命令中,我想添加如下内容:
for [i=1:4] \
stats 'mydata.txt' every ::(1+i*10)::(1+i*10) using 1 nooutput
mean = int(STATS_min)
stats 'mydata.txt' every ::(1+i*10)::(1+i*10) using 2 nooutput
SE = int(STATS_min)
upper = mean + 2 * SE
lower = mean - 2 * SE
然后将上下绘制为图表上的水平线。
我想我可以通过键入 plot upper, lower 来分别绘制它们,但我如何在上面的图表上为所有 i 绘制它们?
谢谢。
【问题讨论】: