title: Contour plot in Python importing txt table file
body: <p>I am trying to make a contour plot like:</p>
  
  <p><img src="https://i.stack.imgur.com/VblsC.jpg" alt="contour"></p>
  
  <p>Using a table of data like 3 columns in a txt file, with a long number of lines.</p>
  
  <p>Using this code:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import scipy.interpolate
  
  data = np.loadtxt(r'dataa.txt')
  
  a = [data[:,0]]
  b = [data[:,1]]
  n = [data[:,2]]
  
  x = np.asarray(a)
  y = np.asarray(b)
  z = np.asarray(n)
  
  print "x = ", x
  print "y = ", y
  print "z = ", z
  
  fig=plt.figure()
  
  CF = contour(x,y,z,colors = 'k')
  
  plt.xlabel("X")
  plt.ylabel("Y")
  plt.colorbar()
  plt.show()
  </code></pre>
  
  <p>I don't know why, it is not working. Python gives me the right axes for the values that I am expecting to see, but in the graph is just a blank and I know that it is importing the data in right way because it shows me my values before the plot.</p>
  
  <p>Example of table: (the diference is because my table has 90000 lines)
  <img src="https://i.stack.imgur.com/YB7XD.jpg" alt="enter image description here"></p>
  
  <p>Using this code:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import scipy.interpolate
  
  N = 1000 #number of points for plotting/interpolation
  
  x, y, z = np.genfromtxt(r'dataa.txt', unpack=True)
  
  xi = np.linspace(x.min(), x.max(), N)
  yi = np.linspace(y.min(), y.max(), N)
  zi = scipy.interpolate.griddata((x, y), z, (xi[None,:], yi[:,None]), method='cubic')
  
  fig = plt.figure()
  plt.contour(xi, yi, zi)
  plt.xlabel("X")
  plt.ylabel("Y")
  plt.show()
  </code></pre>
  
  <p>Ive got this result:
  <img src="https://i.stack.imgur.com/TF1ds.png" alt="enter image description here">
  I think I've got the advices wrongly.</p>