title: How to draw a polynomial curve in matplotlib python?
body: <p>I'm trying to draw a curve for regression fitting. The curve is for a higher degree polynomial ( 6 and above ).</p>
  
  <pre><code>fig=figure()
  ax1=fig.add_axes((0.1,0.2,0.8,0.7))
  ax1.set_title("Training data(blue) and fitting curve(red)")
  ax1.set_xlabel('X-axis')
  ax1.set_ylabel('Y-axis')
  
  ax1.plot(x_train,y_train,'.',x_train,np.polyval(best_coef,x_train),'-r') 
  show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/MZh9M.png" rel="nofollow noreferrer">This is the output of the given code</a></p>
  
  <p>I want it to be a smooth curve.</p>
  
  <p><a href="https://i.stack.imgur.com/7FFmR.png" rel="nofollow noreferrer">something like this , with a continues red line , instead of discreet point of red </a></p>