【发布时间】:2013-10-20 13:33:31
【问题描述】:
我在 Windows 8 机器上使用 gnuplot 版本 4.6,补丁级别 3,终端设置为 wxt。
文件 results.csv 有一个随球体半径变化的能量列表。我正在使用 Gnuplot 生成图表以显示趋势。
不幸的是,由于在用于计算这些能量的程序中只能描述为“数值不稳定性”,results.csv 包含异常结果。因此绘制 results.csv 与:
set datafile separator “,”
set title “Oxygen3 Point Vacancy Defect Energy Variation with \n Radius of Region I in Mott-Littleton Defect Model”
set xlabel ‘Radius of Region I (Å)’
set ylabel ‘Defect Energy (eV)’
set grid
unset key
set border 3
set xtics border nomirror outwards
set ytics border nomirror outwards
set format y '%.2f'
plot ‘results.csv’ using 2:4 smooth unique with linespoints lw 3 lc rgb ‘black’
给出下图:
[注意。我已经减少了这个例子的数据线数量]
由于我想要整体趋势,我想跳过半径 = 16 处的点。但是,将我的绘图命令更改为:
plot 'results.csv' using 2: ($4 > 20 ? $4 : 1/0) smooth unique with linespoints lw 3 lc rgb 'black'
结果:
有没有人对 gnuplot 将 x=9 点连接到 x=17 的原因以及如何克服这个问题提出任何建议。
另外,当我尝试拟合“最佳拟合线”时,如何跳过异常数据点?
任何帮助将不胜感激
【问题讨论】:
标签: gnuplot