title: Plotting values versus strings in matplotlib?
body: <p>I am trying to create a plot in matplotlib where the x-values are integers and the y-values are strings. Is it possible to plot data of this type in matplotlib? I examined the documentation and the <a href="http://matplotlib.sourceforge.net/gallery.html" rel="nofollow">gallery</a> for matplotlib and could not find any examples of this type.</p>
  
  <p>I have many lists bound to a variable called my_lists. The structure looks like this:</p>
  
  <pre><code>mylists = [765340, 765371, 765310,'MA011',],
            [65310, 'MA015'],
            [765422, 765422, 24920205, 24920161, 'MA125'],
            [765422, 'MA105'], 
            [765371, 12345, 'MA004']
  </code></pre>
  
  <p>In each list, all items except the last item are x-values. The last item in each list is a string, which is the single y-value.
  How can I plot this is matplotlib? Here was my attempt:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  for sub_list in my_lists:
      x_value = sub_list[:1]
      y_value = sub_list[-1]
      plt.plot(x_value, y_value, "ro")
      plt.show()
  </code></pre>
  
  <p>The above code throws me this error:</p>
  
  <p>ValueError: could not convert string to float: MA011</p>
  
  <p>How can integers versus strings be plotted?</p>