使用gnuplot的线段 [英] Line segments using gnuplot

查看:66
本文介绍了使用gnuplot的线段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据文件,类似四列,分别代表x1,y1,x2,y2.

I have a data file like in four columns representing x1, y1, x2, y2.

例如

1 2 3 4
2 3 4 5
3 4 5 6
4 5 6 7

现在,我想使用(x1,y1)和(x2,y2)作为线段的终点来绘制线段.因此,我将从上面的数据文件中获得4个线段.

Now I want to plot line segments using (x1,y1) and (x2,y2) as end points of the line segments. Thus I shall get 4 line segments from the above data file.

如何使用gnuplot做到这一点?

How can I achieve this using gnuplot ?

推荐答案

您可以轻松地做到这一点.

You can do this easily.

1 2
3 4

2 3
4 5
...

做到这一点.您只需要在每组坐标之间添加一条额外的线即可.

does this. You just need to add an extra line between each set of cordinates.

希望这个帮助.

这篇关于使用gnuplot的线段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆