title: python Contour plot
body: <p>I have a file which looks like this:</p>
  
  <pre><code>1237665126927237227 7.49126127875 1500 7.0
  1237665126927237227 6.64062342139 1750 7.0
  1237665126927237227 5.79903397289 2000 7.0
  1237665126927237227 7.24807646775 1500 7.5
  1237665126927237227 6.51250095795 1750 7.5
  1237665126927237227 5.74908888515 2000 7.5
  1237665126927237227 6.91915170741 1500 8.0
  1237665126927237227 6.29638684709 1750 8.0
  1237665126927237227 5.62891381033 2000 8.0
  1237665126927237227 6.54437390102 1500 8.5
  1237665126927237227 5.98359412299 1750 8.5
  1237665126927237227 5.43512459898 2000 8.5
  </code></pre>
  
  <p>etc</p>
  
  <p>I need to create a plot with the <code>3rd</code> column as the <code>x</code> axis and <code>4th</code> column as the <code>y</code> axis, with the <code>2nd</code> column as a contour on it, with contour lines at <code>1,2,3,4</code> and so on. </p>
  
  <p>Im am trying to do something along the lines of, </p>
  
  <pre><code>from pylab import *
  
  ChiTable= np.loadtxt('ChiTableSingle.txt')
  
  xlist = linspace(ChiTable[2]) 
  ylist = linspace(ChiTable[3]) 
  X, Y = meshgrid (xlist, ylist)
  
  Z =partsChi[1] 
  
  figure()
  CP1 = contour(X, Y, Z)
  clabel(CP1, inline=True, fontsize=10)
  
  pl.show()
  </code></pre>
  
  <p>but im just getting myself totally confused by it all. Im getting an error saying z input needs to be a 2d array, which i can understrnd why as ive made X,Y into a 2d array, and z needs to be values matching up to this, but ive got no idea how id go about that. </p>