title: Adding multiple lines of different colors in matplotlib
body: <p>I am trying to plot multiple lines in a single figure, and I want each line to be of unique color, I came to know that matplotlib does that by default. But in my case it isn't working. I get same color for each of the lines in the figure.</p>
  
  <pre><code>from sklearn import datasets
  import pandas as pd
  import numpy as np
  import random
  import matplotlib.pyplot as plt
  
  # Loading the Boston dataset from the sklearn and creating a dataframe 
  boston = datasets.load_boston()
  data = pd.DataFrame(boston.data, columns = boston.feature_names)
  
  
  #for dropping multiple column 
  dataDrop = data.drop(['CRIM','DIS', 'ZN', 'INDUS','CHAS','NOX', 'RAD', 
  'TAX','LSTAT', 'B', 'PTRATIO', 'RM'], axis=1)
  
  
  #converting to numpy array
  m = 20
  dataArray = dataDrop['AGE'].values
  absMean = dataArray.mean()
  
  for k in range(0,10):
      n = len(dataDrop.index)
      p = random.random()
      c = int(n*p)
      #Uniform sampling of c elements from the above
      mean = 0 
      values = np.empty([1, 2])
      for i in range(0,m):
          mean = ( mean*i + np.random.choice(dataArray, c).mean() ) / (i+1)
          print mean, i
          tuple = np.array([mean, i])
          values = np.vstack([values,tuple])
      print values
      plt.plot(values[1:,1], values[1:,0])
  plt.axhline(absMean, color = 'red')
  plt.show()
  </code></pre>