title: Drawing a straight line averaging a curve
body: <p>I would like to draw a straight line that makes the average of a curve. I am plotting my data like that:</p>
  
  <pre><code>plot 'dataset' u 2:4 w p smooth bezier
  </code></pre>
  
  <p>My data consists of multiple columns and I would get something like that:<img src="https://i.stack.imgur.com/Grau3.png" alt="enter image description here"></p>
  
  <p>Any ideas of how to do it? I guess it is more an interpolation than an average. It is not relevant the ups and downs of the curve, and it would be much better to have a straight line interpolating the curve...</p>
  
  <p>Using a straight line could be more or less easy to fit using <code>fit</code> however, how could I fit a curve that does not look like a well know curve? Let me show you an example? How could I fit a smooth curve among the main group of points? Please notice that there is some noise on the lower part of the graph that I wouldn't like to represent.
  <img src="https://i.stack.imgur.com/3TBUa.png" alt="enter image description here"></p>