title: 2 different surface charts with matplotlib python
body: <p>I'm creating 2 surface charts, where I'm only changing the vertical ("z") axis values.
  The first chart looks exactly how I want, but in the second one it looks like its taking the values of the first chart to apply the colormap. </p>
  
  <p>This is the first chart:
  <a href="https://i.stack.imgur.com/smQrt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/smQrt.png" alt="Chart 1"></a>
  This is the second chart:
  <a href="https://i.stack.imgur.com/PiSY6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PiSY6.png" alt="Chart 2"></a></p>
  
  <p>And here goes the code for first Chart:</p>
  
  <pre><code>x1 = np.linspace(df3.num_stdev.min(), df3.num_stdev.max(), len(df3.index))
  y1 = np.linspace(df3.hold.min(), df3.hold.max(), len(df3.index))
  
  x2, y2 = np.meshgrid(x1,y1)     
  z2 = griddata((df3.num_stdev, df3.hold), df3.cumpnl, (x2,y2), method='cubic')
  
  fig1 = plt.figure()
  ax = fig1.gca(projection='3d')
  surf = ax.plot_surface(x2,y2,z2, rstride=1, cstride=1, cmap=cm.RdYlBu,
                         linewidth=0,antialiased=False)
  
  ax.set_zlim(df3.cumpnl.min(),df3.cumpnl.max())
  ax.zaxis.set_major_locator(LinearLocator(10))
  ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
  
  fig1.colorbar(surf, shrink=0.5, aspect=5)
  
  titulo = "Mean Reverting PnL for {0} with 5d cum returns".format(currency)
  plt.xlabel('num_stdev')
  plt.ylabel('holding')
  plt.title(titulo)
  plt.show()
  </code></pre>
  
  <p>Here goes the code for the second chart:</p>
  
  <pre><code>df4 = df3[pd.notnull(df3['sharpe'])]  # getting rid of Nan Sharpes
  
  x3 = np.linspace(df4.num_stdev.min(), df4.num_stdev.max(), len(df4.index))
  y3 = np.linspace(df4.hold.min(), df4.hold.max(), len(df4.index))
  
  x4, y4 = np.meshgrid(x3,y3)
  z4 = griddata((df4.num_stdev, df4.hold), df4.sharpe, (x4,y4), method='cubic')
  
  fig2 = plt.figure()
  ax1 = fig2.gca(projection='3d')
  surf2 = ax1.plot_surface(x4,y4,z4, rstride=1, cstride=1, cmap=cm.RdYlBu,
                          linewidth=0, antialiased=False)
  
  ax1.set_zlim(df4.sharpe.min(),df4.sharpe.max())
  #ax1.zaxis.set_major_locator(LinearLocator(10))
  #ax1.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
  
  fig2.colorbar(surf2, shrink=0.5, aspect=5)
  titulo2 = "Sharpe for {0} with 5d cum returns".format(currency)
  plt.xlabel('num_stdev')
  plt.ylabel('holding')
  
  plt.title(titulo2)
  plt.show()
  </code></pre>