title: Smooth Contourf plot completely filled
body: <p>I have the data with (X,Y,Z) values. I tried to make a density plot with Z values for intensity. However the plot I get is not smooth and and has polytope i.e not completely filled.</p>
  
  <p>The following is the code with the <a href="https://drive.google.com/file/d/1HtRr21iUuYoAU-XKAWhjhFtP6EwA2Fdw/view?usp=sharing" rel="nofollow noreferrer">Data</a></p>
  
  <p>but I want to obtain smooth and completely filled plot</p>
  
  <pre class="lang-py prettyprint-override"><code>
  import numpy as np
  from scipy.interpolate import griddata
  import matplotlib.pyplot as plt
  import xlrd
  location = "~/Desktop/Data.xlsx"
  data = xlrd.open_workbook(location)
  sheet = data.sheet_by_index(0)
  sample=2000
  
  x=np.array(sheet.col_values(0))[0:sample]
  y=np.array(sheet.col_values(1))[0:sample]
  z=np.hamming(9000)[0:sample]
  print z
  def plot_contour(x,y,z,resolution = 500,contour_method='cubic'):
      resolution = str(resolution)+'j'
      X,Y = np.mgrid[min(x):max(x):complex(resolution),   min(y):max(y):complex(resolution)]
      points = [[a,b] for a,b in zip(x,y)]
      Z = griddata(points, z, (X, Y), method=contour_method)
      return X,Y,Z
  
  X,Y,Z = plot_contour(x,y,z,resolution = 500,contour_method='linear')
  
  plt.style.context("seaborn-deep")
  
  plt.contourf(X,Y,Z)
  plt.colorbar()
  plt.show()
  
  </code></pre>
  
  <p>This is the output:</p>
  
  <p><a href="https://i.stack.imgur.com/3gaE5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3gaE5.png" alt="enter image description here"></a></p>
  
  <p>This is what I want to achieve using contourplotf:</p>
  
  <p><a href="https://i.stack.imgur.com/dLqt8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dLqt8.png" alt="enter image description here"></a></p>