好吧,我收到了错误
gnuplot> plot "plot_error.p"
^
Bad data on line 1
Run Code Online (Sandbox Code Playgroud)
当试图plot_error.p在以下数据文件上执行绘图脚本时(tesc_error.dat)
2 0.02373300 0.00187922
3 0.12182900 0.01080161
4 0.30066000 0.02936487
5 0.88415600 0.07882007
6 1.70864800 0.14576794
7 4.11814900 0.44127670
8 8.79967900 0.84273207
9 22.09179700 2.25049799
10 54.13644000 5.28557289
11 164.75478299 20.67593118
12 376.32501997 39.98897077
13 807.50995700 82.47956624
Run Code Online (Sandbox Code Playgroud)
脚本是
set encoding iso_8859_1
set terminal postscript eps enhanced color solid
set xrange[1:14]
set yrange[0:900]
set title "1D MFPT"
set xlabel "{/Symbol G}"
set ylabel "t_{esc}"
unset key
set output "tesc_error.eps"
y(x)=1/(9*x**(2/3))*exp(x-1)
plot "tesc_error.dat" with yerrorbars, y(x) lt rgb "blue"
set key
Run Code Online (Sandbox Code Playgroud)
最奇怪的是我最近没有错误地绘制它,但突然间它突然出现了这个错误.我已经检查了数据文件的第1行,其中没有任何内容.
问题是您使用该plot命令调用脚本.
尝试:
load "plot_error.p"
Run Code Online (Sandbox Code Playgroud)
代替.
该plot命令需要数据文件而不是脚本.