我在使用代码时遇到以下错误。绘图命令中awk的gnuplot错误
gnuplot> set terminal epslatex size 13.1cm,6cm color colortext
Terminal type set to 'epslatex'
Options are ' leveldefault color colortext \
dashed dashlength 1.0 linewidth 1.0 butt noclip \
nobackground \
palfuncparam 2000,0.003 \
input size 13.10cm, 6.00cm "" 11 fontscale 1.0 '
gnuplot> set output 'C:\MajCha\gnuplot\alpha_cl.tex'
gnuplot> filename= 'C:\MajCha\gnuplot\DU_08-W-180-65_cf_c_02_InpPrePro.txt'
gnuplot> #
gnuplot> set xrange [-10:10]
gnuplot> set yrange [-3:3]
gnuplot> plot "< awk '$1==-180.0 { print $2, $3 }'" filename using 2:3
warning: Skipping unreadable file "< awk '$1==-180.0 { print $2, $3 }'"
No data in plot
gnuplot> #
gnuplot> unset output
gnuplot> reset
我怎么能解决这个error.I想我在一个循环范围作出§1= -180 -180至180支票,请给我建议一些可能的方法可以做到。
随着使用以下代码
reset
set terminal epslatex size 13.1cm,6cm color colortext
set output 'C:\MajCha\gnuplot\alpha_cl.tex'
filename= 'C:\MajCha\gnuplot\DU_08-W-180-65_cf_c_02_InpPrePro.txt'
#
unset key
set xrange [-10:10]
set yrange [-3:3]
plot for [i=-180:180] filename using (($1==i)?$2:1/0):3
#
unset output
reset
reset
set terminal epslatex size 13.1cm,6cm color colortext
set output 'C:\MajCha\gnuplot\alpha_cl.tex'
filename= 'C:\MajCha\gnuplot\DU_08-W-180-65_cf_c_02_InpPrePro.txt'
#
unset key
set xrange [-10:10]
set yrange [-3:3]
plot for [i=-180:180] filename using (($1==i)?$2:1/0):3 with lines
#
unset output
reset
您需要的语法如下:'阴谋“
如果您可以显示一段数据,并具体说明想要获得的结果,这将有所帮助。 –
'awk'是一个命令行工具,它不是gnuplot的一部分,并且您的Windows系统上可能没有这个工具 – Christoph