英文:
Why plot with line doesn't work with gnuplot
问题
我想绘制温度曲线图。
我的代码:
set multiplot layout 2,2 rowsfirst
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):4 w l lw 2 t 'phi=0.0'.i
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):3 w lp t 'phi=0.0'.i
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):6 w lp t 'phi=0.0'.i
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):5 w lp t 'phi=0.0'.i
unset multiplot
我的输出图:
如您在第一个图中所见,没有显示任何内容,我不明白为什么?
我的数据:https://drive.google.com/file/d/13ZvG4OsKfqMKavL7VsxLn5w688hvGfLH/view?usp=sharing
是因为空行吗?
谢谢!
英文:
I would like to plot a profile of temperature using line.
My code :
set multiplot layout 2,2 rowsfirst
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):4 w l lw 2 t 'phi=0.0'.i
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):3 w lp t 'phi=0.0'.i
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):6 w lp t 'phi=0.0'.i
p for [i=1:5] './phi=0.0'.i.'/Field/Fields_1.00e+04_800.dat' u ($2==-5e-07?$1:1/0):5 w lp t 'phi=0.0'.i
unset multiplot
What I get :
As you can see on the first plot, nothing appears and I don't understand why ?
My data : https://drive.google.com/file/d/13ZvG4OsKfqMKavL7VsxLn5w688hvGfLH/view?usp=sharing
Is due to the blanks lines ?
Thank you !
答案1
得分: 1
短回答:
我猜这是经过筛选的数据与空白行以及绘图样式 with lines
的组合。
一个可能的解决方案:
- 删除空白行
- 并在绘图命令之前添加一行
set datafile missing NaN
如果您不想更改原始数据文件,还有其他解决方案。
英文:
Short answer:
I guess it is a combination of filtered data and blank lines and the plotting style with lines
.
One possible solution:
- remove the blank lines
- and before your plotting commands add a line
set datafile missing NaN
There are other solutions in case you don't want to change your original data files.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论