title: Plot 2 3d surface side by side using matplotlib
body: <p>I'm trying to extens <a href="https://matplotlib.org/examples/mplot3d/trisurf3d_demo.html" rel="nofollow noreferrer">this example</a> and plot 2 3d surface plots side by side.</p>
  
  <p>Here is the code, it works, but for some reason plots displayed cropped and squeezed. How to fix it?</p>
  
  <pre><code>#Plot side by side
  def plot_xyz_data():    
      n_radii = 8
      n_angles = 36
      radii = np.linspace(0.125, 1.0, n_radii)
      angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False)
      angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1)
      x = np.append(0, (radii*np.cos(angles)).flatten())
      y = np.append(0, (radii*np.sin(angles)).flatten())
      z1 = np.sin(-x*y)
      z2 = np.cos(x**2)
  
      print('x.shape', x.shape)
      print('y.shape', y.shape)
      print('z1.shape', z1.shape)
      print('z2.shape', z2.shape)
  
      fig = plt.figure()
      ax1 = fig.add_subplot(121,projection='3d')
      surf1 = ax1.plot_trisurf(x, y, z1, cmap=cm.jet, antialiased=True)
      ax1.set_xlabel('x label')
      ax1.set_ylabel('y label')
      ax1.set_zlabel('z1 label')
  
      ax2 = fig.add_subplot(122,projection='3d')
      surf2 = ax2.plot_trisurf(x, y, z2, cmap=cm.jet, antialiased=True)
      ax2.set_xlabel('x label')
      ax2.set_ylabel('y label')
      ax2.set_zlabel('z2 label')
  
      plt.savefig("sample.png",bbox_inches='tight',dpi=100)
  
      plt.show()
  
  plot_xyz_data()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/1tDiC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1tDiC.png" alt="enter image description here"></a></p>
  
  <p><strong>Update:</strong></p>
  
  <p>Looks like setting <code>fig = plt.figure(figsize=(16, 12))</code> helps, but still not perfect: 'y label' overlaps with numbers. Any way to fix it?
  <a href="https://i.stack.imgur.com/K0RaF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K0RaF.png" alt="enter image description here"></a></p>