【发布时间】:2016-11-10 21:28:01
【问题描述】:
我对带有 lines 命令的绘图有疑问。我必须从一个巨大的数据文件中绘制大约 360 条线。我的输入文件中的示例数据是
-180.00000000,-10.00000000,0.00000000,0.01000000,0.00000000
-179.00000000,-10.00000000,0.07551000,0.01060500,0.04000000
-178.00000000,-10.00000000,0.15102000,0.01121000,0.08000000
-177.00000000,-10.00000000,0.22653000,0.01181400,0.12000000
-176.00000000,-10.00000000,0.30204000,0.01241900,0.16000000
-175.00000000,-10.00000000,0.37755000,0.01302400,0.20000000
-174.00000000,-10.00000000,0.45306000,0.01362900,0.24000000
-173.00000000,-10.00000000,0.52857000,0.01423400,0.28000000
-172.00000000,-10.00000000,0.60408000,0.01483900,0.32000000
-171.00000000,-10.00000000,0.67959000,0.01544300,0.36000000
-170.00000000,-10.00000000,0.75510000,0.01604800,0.40000000
-169.00000000,-10.00000000,0.73638000,0.02735300,0.38295000
-168.00000000,-10.00000000,0.71766000,0.03865800,0.36590000
如下代码
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_betaconst.tex'
filename= 'C:\MajCha\gnuplot\DU_08-W-180-65_cf_c_02_InpPrePro.txt'
#
unset key
set xrange [-180:180]
set yrange [-3:3]
plot for [i=-10:10] filename using (($2==i)?$1:1/0):3 with lines
#
unset output
reset
我也使用过 awk,在这种情况下它显示“awk 未被识别为内部或外部命令”并且它正在跳过而不绘制任何内容。我想要线条而不是线条的情节。
【问题讨论】:
标签: gnuplot