title: (Python) Unable to See Matplotlib Plot
body: <p>I'm using the following code to try to generate a contour plot using matplotlib.</p>
  
  <p>Script Code:</p>
  
  <pre><code>#!/usr/bin/python
  
  from mpl_toolkits.basemap import Basemap
  import matplotlib.pyplot as plt
  import matplotlib.cm as cm
  import matplotlib.colors as colors
  import numpy as np
  from matplotlib.mlab import griddata
  
  a = np.loadtxt('/home/weather/site_data')
  
  def show_map(self, a):
  
      # 'a' is of the format [(lats, lons, data), (lats, lons, data)... (lats, lons, data)]
      lats = [ x[0] for x in a ]
      lons = [ x[1] for x in a ]
      data = [ x[2] for x in a ]
  
      lat_min = min(lats)
      lat_max = max(lats)
      lon_min = min(lons)
      lon_max = max(lons)
      data_min = min(data)
      data_max = max(data)
  
      spatial_resolution = 0.5
      fig = plt.figure()
  
      x = np.array(lons)
      y = np.array(lats)
      z = np.array(data)
  
      xinum = (lon_max - lon_min) / spatial_resolution
      yinum = (lat_max - lat_min) / spatial_resolution
      xi = np.linspace(lon_min, lon_max + spatial_resolution, xinum)        # same as [lon_min:spatial_resolution:lon_max] in matlab
      yi = np.linspace(lat_min, lat_max + spatial_resolution, yinum)        # same as [lat_min:spatial_resolution:lat_max] in matlab
      xi, yi = np.meshgrid(xi, yi)
  
      zi = griddata(x, y, z, xi, yi)
  
      m = Basemap(
          projection = 'merc',
          llcrnrlat=lat_min, urcrnrlat=lat_max,
          llcrnrlon=lon_min, urcrnrlon=lon_max,
          rsphere=6371200., resolution='l', area_thresh=10000
      )
  
      m.drawcoastlines()
      m.drawstates()
      m.drawcountries()
  
      lat, lon = m.makegrid(zi.shape[1], zi.shape[0])
      x,y = m(lat, lon)
      m.contourf(x, y, zi)
  
  plt.show()
  </code></pre>
  
  <p>Data:</p>
  
  <pre><code>[(45.43, -75.65, 75.9), (44.30, -73.63, 85.2), (45.76, -65.76, 68.2)]
  </code></pre>
  
  <p>I'm trying to figure out if I am inputting the data incorrectly or if there is another underlying issue at hand.</p>
  
  <p>I keep getting the following error code:</p>
  
  <pre><code>ValueError: could not convert string to float: [(45.43,
  </code></pre>
  
  <p>I tried fixing it myself and thought that I figured it out by removing all parentheses and commas but, then the script didn't even plot an image.</p>