I am using gnuplot version 4.6, patch level 3 on a windows 8 machine, terminal set to wxt.
The file results.csv has a list of energies varying with radius of a sphere. I am using Gnuplot to produce a graph in order to show the trend.
Unfortunately, due to what can only be described as 'numerical instabilities' within the program that was used to compute these energies, results.csv includes anomalous results. Thus plotting results.csv with:
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’
gives the following graph:
[N.B. I have reduced the number of datalines for this example]
As I want the overall trend, I want to skip the point at radius = 16. However, changing my plot command to:
plot 'results.csv' using 2: ($4 > 20 ? $4 : 1/0) smooth unique with linespoints lw 3 lc rgb 'black'
results in:
Has anyone got any suggestions as to what is making gnuplot connect the x=9 point to x=17 and how to overcome this problem.
Also, how do I skip the anomalous data point when I try and fit a 'line of best fit'?
Any help would be much appreciated