title: displaying graph after importing txt file matplotlib
body: <p>I am writing a simple program to output a basic graph after importing a text file. i get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Chris1\Desktop\attempt2\ex1.py", line 13, in &lt;module&gt;
      x.append(int(xAndY[0]))
  ValueError: invalid literal for int() with base 10: '270.286'
  </code></pre>
  
  <p>my python code looks like this:</p>
  
  <pre><code>    import matplotlib.pyplot as plt
  
  x = []
  y = []
  
  readFile = open ('temp.txt', 'r')
  
  sepFile = readFile.read().split('\n')
  readFile.close()
  
  for plotPair in sepFile:
      xAndY = plotPair.split(',')
      x.append(int(xAndY[0]))
      y.append(int(xAndY[1]))
  
  print x
  print y
  
  
  
  plt.plot(x, y)
  
  plt.title('example 1')
  plt.xlabel('D')
  plt.ylabel('Frequency')
  
  plt.show()    
  </code></pre>
  
  <p>a snippet of my text file looks like this:</p>
  
  <pre><code>270.286,4.353,16968.982,1903.115
  38.934,68.608,16909.727,1930.394    
  190.989,1.148,16785.367,1969.925         
  </code></pre>
  
  <p>the issue seems minor but cannot seem to resolve it myself
  thanks</p>