0

我有一些数据是x0, y0, x1, y1格式行的一系列端点。

例如 :

 x0    y0    x1    y1
-----------------------    
 1.0,  1.1,  2.0,  1.0

 2.0,  1.0,  2.0,  2.0

 2.0,  2.0,  1.0,  2.0

 1.0,  2.0,  1.0,  1.0

我不需要任何轴数据、文本标题或页码。如果需要,我可以放大或缩小数据或添加固定偏移量。

如何将此数据转换为可以打印在 8.5 x 11 纸上的文件?

4

2 回答 2

1

如果我理解正确,您想从 to 绘制一个矩形(1,1)(2,2)并删除所有轴等?

最简单的方法可能是这样的:

unset xtics
unset ytics
unset border
set yrange [0:3]
set xrange [0:3]
set obj 1 rect from 1,1 to 2,2
plot NaN notitle

我假设第一个1.1是错字。否则,您可以绘制单独的线:

unset xtics
unset ytics
unset border
set yrange [0:3]
set xrange [0:3]
set style arrow 1 nohead
set arrow from 1,1.1 to 2,1 as 1
set arrow from 2,1 to 2,2 as 1
set arrow from 2,2 to 1,2 as 1
set arrow from 1,2 to 1,1 as 1
plot NaN notitle
于 2010-02-23T20:50:28.103 回答
0

Assuming that the data is in a file called 'data.dat', probably the simplest way to draw the line segments indicating their direction (this may or may not be wanted, in which case there is also probably a formatting option to the with vectors plotting option although I don't know what it is off-hand) would be the following,

plot [0:3][0:3] 'data.dat' u 1:2:($3-$1):($4-$2) notitle with vectors

as Alok indicated in his post, the axes of the plot can be removed with the unset commands he used

unset xtics; unset ytics; unset border

This will generate a plot that looks like the following,

alt text

于 2010-02-24T19:13:22.833 回答