title: Using SciPy to interpolate data into a quadratic fit
body: <p>I have a set of data that when plotted most points congregate to the left of the x axis:</p>
  
  <pre><code>plt.plot(x, y, marker='o')
  plt.title('Original')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lcalM.png" rel="nofollow noreferrer">ORIGINAL GRAPH</a></p>
  
  <p>I want to use scipy to interpolate the data and later try to fit a <strong>quadratic line</strong> to the data. I am <strong>avoiding</strong> to simply fit a quadratic curve <strong>without interpolation</strong> since this will make the obtained curve <em>biased towards the mass of data at one extreme end of the x axis</em>. I tried this by using</p>
  
  <pre><code>f = interp1d(x, y, kind='quadratic')
  
  # Array with points in between min(x) and max(x) for interpolation
  x_interp = np.linspace(min(x), max(x), num=np.size(x))
  
  # Plot graph with interpolation
  plt.plot(x_interp, f(x_interp), marker='o')
  plt.title('Interpolated')
  plt.show()
  </code></pre>
  
  <p>and got <a href="https://i.stack.imgur.com/8WdUX.png" rel="nofollow noreferrer">INTERPOLATED GRAPH</a>.</p>
  
  <p>However, what I intend to get is something like this:
  <a href="https://i.stack.imgur.com/1NgB2.png" rel="nofollow noreferrer">EXPECTED GRAPH</a></p>
  
  <p>What am I doing wrong?</p>
  
  <p>My values for x can be found <a href="http://m.uploadedit.com/bbtc/1520097369651.txt" rel="nofollow noreferrer">here</a> and values for y <a href="http://m.uploadedit.com/bbtc/1520096335678.txt" rel="nofollow noreferrer">here</a>.
  Thank you!</p>