如何使用gnuplot从一列文件中制作水平线? [英] How to do horizontal lines from a one column file using gnuplot?
本文介绍了如何使用gnuplot从一列文件中制作水平线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
仅具有一列数据的文件,例如:
Having a file with just one column of data like for example:
10
2
34
4.5
16
我想绘制一堆水平线,就像绘制一条从-3到3(x范围)的水平线一样,其y值等于第一行(在示例中为10),然后重新绘制另一条水平线范围从x = [-3:3]开始,y值等于第二行(在示例中为2),依此类推.
I'd like to plot a stack of horizontal lines as plotting a horizontal line from let's say -3 to 3 (x range) for a y value equal to the first row (10 in the example), then replot a another horizontal line ranging from x=[-3:3] with a y value equal to the second row (2 in the example), and so on.
我该怎么办?
推荐答案
使用vectors
绘图样式.
plot "file" using (-3):($1):(6):(0) with vectors nohead
using
表达式中的四个值是x
(普通数-3),y
(第一列中的值),dx
和dy
.
The four values in the using
expression are x
(plain number -3), y
(value from first column), dx
and dy
.
这篇关于如何使用gnuplot从一列文件中制作水平线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文