title: Smooth line on histograms in gnuplot
body: <p>I want to make a smooth line over histograms. So far I have tried all the smooth functions but I am not able to get the result.</p>
  
  <p>For the histograms I am using:</p>
  
  <pre><code>plot "file.scatter" u (hist($2,width)):(1.0) smooth freq w boxes notitle
  </code></pre>
  
  <p>and the result is:<a href="https://i.stack.imgur.com/UB3Jc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UB3Jc.png" alt="this"></a></p>
  
  <p>But when I ask gnuplot to draw a smooth line over these:</p>
  
  <pre><code>plot "file.scatter" u (hist($2,width)):(1.0) smooth freq w l notitle
  </code></pre>
  
  <p>I get: 
  <a href="https://i.stack.imgur.com/YOCMl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YOCMl.png" alt="this"></a></p>
  
  <p>I want the line plot to look smooth like a probability density function(of course the values will have to be normalized).</p>
  
  <p>Any clues experts?</p>