title: Correlation Plot Color mismatch in Python using matplotlib
body: <p>I am plotting correlation of data in python using  matplotlib. The highly correlated data should be coloured dark red but it is coloured as yellow in my case. How to solve it?</p>
  
  <p><strong>My correlation data is this:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/vwoIl.png" alt="Screen shot"></p>
  
  <p><strong>My code is like this:</strong></p>
  
  <pre><code>def plot_corr(df, size=11):
  
  """\
  Function plots a graphical correlation matrix for each pair of columns in the dataframe.
  
  Input:
      df: pandas Dataframe
      size: vertical and horizontal size of the plot
  
  Displays:
      matrix of correlation between columns. Blue-cyan-yellow-red-darkred =&gt; less to more correlated
                                             0 ------------------------&gt; 1
                                             Expect a darkred line running from top left to bottom right
  """
  corr = df.corr()    #data frame correlation function
  fig, ax = plt.subplots(figsize=(size,size))
  ax.matshow(corr)    # color code  the rectangles by correlation value
  plt.xticks(range(len(corr.columns)), corr.columns)   # draw x tick marks
  plt.yticks(range(len(corr.columns)), corr.columns)   # draw y tick marks
  </code></pre>
  
  <p><strong>My output is like this:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/B2CvK.png" alt="Screen Shot"></p>