title: How can I combine graphs in Python? (I'm getting multiple graphs.)
body: <p>My script generates 8 separate graphs. I want to be able to see all lines on one graph. Also, if prompted I want to produce subplots; so in my case, 8 graphs on 1 sheet.</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  columns = input('How many columns? ')
  data = np.genfromtxt('csv_file',delimiter=',', dtype = float)
  
  m = 1
  p = 0
  while p == 0:
      if m &lt; (columns):
          x = [row[0] for row in data]
          y = [row[m] for row in data]
          fig = plt.figure()
          ax = fig.add_subplot(111, axisbg = 'w')
          ax.plot(x,y,lw=1.3)
          plt.show()
      else:
          p = 1
          m = m+1
  </code></pre>