如何在gnuplot中使用给定的xrange从x = 0开始?

时间:2014-12-06 03:14:14

标签: gnuplot

在gnuplot中,是否可以在给定的x范围内以x = 0开始图形?

假设我有这段代码:

set xrange [100:500]
plot "input.txt" using 2:1:(1.0) notitle with lines lw 1

因此,图表将从x = 100开始,到x = 500结束。 我希望图表从x = 0开始,以x = 400结束,给定范围[100:500]。 我怎么能这样做?

谢谢!

1 个答案:

答案 0 :(得分:2)

只需使用[0:400]范围并从数据值中减去100:

set xrange [0:400]
plot "input.txt" using ($2-100):1 with lines
相关问题