Gnuplot - data points and interpolation

I have two columns in the data file:

xy 1 5 1 10 2 3 4 5 4 6 4 14 

That is, I have a result set ( y values) for a specific value of x . I want to create a graph with gnuplot that displays all the data points above and a curve going through their averages:

  xy 1 (5+10)/2 2 3 4 (5+6+14)/4 

It should be pretty simple, but I can't find it.

How can i do this?

+6
source share
1 answer
 plot "datafile" u 1:2 smooth unique 

does exactly what you want.

+9
source

Source: https://habr.com/ru/post/950278/


All Articles