title: Correlation Matrix labels in Python
body: <p>I'm using Python3.  The top of my matrix is a problem, all the labels are overlapping so you can't read them.  How do I fix this?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pandas
  import numpy
  budget_adj  revenue_adj
  mov_data = ['popularity', 'budget', 'revenue', 'runtime', 'vote_average', 
  'release_year']
  #data = pd.read_csv(url, names=names)
  correlations = db.corr()
  # plot correlation matrix
  fig = plt.figure()
  ax = fig.add_subplot(111)
  subplotsize=[8.,8.]
  figuresize=[10.,10.]   
  left = 0.5*(1.-subplotsize[0]/figuresize[0])
  right = 1.-left
  bottom = 0.5*(1.-subplotsize[1]/figuresize[1])
  top = 1.-bottom
  fig.subplots_adjust(left=left,right=right,bottom=bottom,top=top)
  cax = ax.matshow(correlations, vmin=-1, vmax=1)
  fig.colorbar(cax)
  ticks = numpy.arange(0,5,1)
  ax.set_xticks(ticks)
  ax.set_yticks(ticks)
  ax.set_xticklabels(mov_data)
  ax.set_yticklabels(mov_data)
  plt.show()
  </code></pre>
  
  <p>An here is what it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/7iKUg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7iKUg.png" alt="enter image description here"></a></p>