Linux中gnuplot的问题

时间:2015-09-22 22:16:31

标签: linux bash gnuplot

我想使用gnuplot在图形中表示信息,但我遇到了问题,因为gnuplot在执行时发送了一个错误。 我把代码表:

Tablas.txt

100,69.62,71.5649,10.04,10.1743
105,74.94,78.6931,10.36,10.8261
110,95.72,86.1286,11.12,11.4779
115,90.76,93.8714,11.88,12.1298
120,96.42,101.922,12.62,12.7816
125,113.96,110.279,12.84,13.4334
130,120.08,118.944,13.46,14.0852
135,125.12,127.916,13.94,14.737
140,139.02,137.196,18.74,15.3889
145,161.12,146.782,16.3,16.0407
150,157.22,156.677,18.46,16.6925
155,161.4,166.878,17.8,17.3443
160,169.7,177.387,20.28,17.9962
165,199.06,188.203,19.28,18.648
170,190.44,199.327,18.36,19.2998
175,201.86,210.758,18.92,19.9516
180,237.18,222.496,19.9,20.6034
185,228.98,234.542,20.64,21.2553
190,236.7,246.894,21.74,21.9071
195,265.32,259.555,22.04,22.5589
200,259.92,272.522,22.3,23.2107
205,310.02,285.797,23.48,23.8626
210,287.96,299.38,25.04,24.5144
215,312.38,313.269,24.22,25.1662
220,314.82,327.466,24.72,25.818
225,343.7,341.97,25.42,26.4698
230,343.18,356.782,25.8,27.1217
235,388.08,371.901,26.5,27.7735
240,395.6,387.327,30.5,28.4253
245,392.02,403.061,31.36,29.0771
250,431.7,419.102,31.92,29.729
255,445.42,435.45,30.22,30.3808
260,439.88,452.106,31.16,31.0326
265,475.14,469.069,30.54,31.6844
270,493.12,486.339,31.38,32.3362
275,507.32,503.917,33,32.9881
280,519.48,521.802,33.72,33.6399
285,529.14,539.994,33.5,34.2917
290,561.02,558.494,34.12,34.9435
295,578.88,577.301,35.82,35.5954
300,592.08,596.416,38.2,36.2472

这是我的gnuplot脚本代码。我使用:

执行它

ejemplo_gnuplot.sh

#!/bin/bash
cat << _end_ | gnuplot
set terminal postscript eps color
set output "grafico.eps"
set key right bottom
set xlabel "Etiqueta eje X"
set ylabel "Etiqueta Eje Y"
plot 'tablas.txt' using 1:2 t "Datos columna 2 frente a 1" w l,     'tablas.txt' using 1:3 t "Datos columna 3 frente a 1" w l, 'tablas.txt' using 1:5 t "Datos columna 5 frente a 1" w l, 'tablas.txt' using 1:6 t "Datos columna 6 frente a 1" w l 
_end_

这是脚本执行的输出

ejecutar script

./ejemplo_gnuplot.sh 
         line 0: warning: Skipping data file with no valid points
         line 0: warning: Skipping data file with no valid points
         line 0: warning: Skipping data file with no valid points
         line 0: warning: Skipping data file with no valid points

gnuplot> plot 'tablas.txt' using 1:2 t "Datos columna 2 frente a 1" w l, 'tablas.txt' using 1:3 t "Datos columna 3 frente a 1" w l, 'tablas.txt' using 1:5 t "Datos columna 5 frente a 1" w l, 'tablas.txt' using 1:6 t "Datos columna 6 frente a 1" w l 
                                                                                                                                                                                                                                                         ^
         line 0: x range is invalid

有人可以帮我解决问题,请问? 感谢

0 个答案:

没有答案