开发者

gnuplot skips data file "with no valid points"

开发者 https://www.devze.com 2023-04-01 05:18 出处:网络
I\'ve got a datafile with some values: -55 471 485 500 -50 495 510 524 -40 547 562 576 -30 603 617 632 -20 662 677 691

I've got a datafile with some values:

-55 471 485 500
-50 495 510 524
-40 547 562 576
-30 603 617 632
-20 662 677 691
-10 726 740 754
0 794 807 820
10 865 877 889
20 941 951 962
25 980 990 1000
30 1018 1029 1041
40 1097 1111 1125
50 1180 1196 1213
60 1266 1286 1305
70 1355 1378 1402
80 1447 1475 1502
90 1543 1575 1607
100 1642 1679 1716
110 1745 1786 1828
120 1849 1896 1943
125 1900 1950 2000
130 1950 2003 2056
140 2044 2103 2162
150 2124 2189 2254

When I call the following gnuplot script:

set terminal latex
set output 'foo.tex'
unset key
set format "%g"
set autoscale
set xlabel "Temperatur an $R_1$ [$^{{\degree}C}$]"
set ylabel 'Ladezeit [$ms$]'
f(r) =(log(1/3)*r*(47*(10e-6)))*-1
plot开发者_如何学JAVA [-55:150] [0:3] '/some/path/res/kty_81-121.dat' using 1:(f($3)) with lines

gnuplot spits out a rather general error warning: Skipping data file with no valid points. After hours of doing research about this problem I have still no answer.

Does someone know how to fix this?


When divide integer with integer, gnuplot automatically cast the output into integer. Thus, the argument of the log function becomes zero (i.e. int(1/3) = 0), and became -inf. Change the function as below.

f(r) =(log(1.0/3.0)*r*(47*(10e-6)))*-1
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号