title: Python: How can I apply the polyfit feature in 3D with 3 arrays x[], y[], z[]
body: <p>I have this 3 arrays with my data:</p>
  
  <pre><code>X=np.array(x)
  Y=np.array(y)
  Z=np.array(z)
  </code></pre>
  
  <p>I know how to plot my points, and how to aply the polyfit in 2D. How can I get the polyfit coefficients from my data in 3D? And can I plot my 3D fitting curve?</p>