title: Change the cell size of Heatmap
body: <p>I plotting a Heatmap with the code bellow, it contains 6 columns and 40 rows so when I plot the heatmap its looks like a narrow column figure:</p>
  <pre><code>import numpy as np
  import pandas as pd
  import matplotlib
  import matplotlib.pyplot as plt
      
  data = pd.read_csv('X.csv')
  x = data.drop(['P'],1)
  y = data['P']
  Performance_Indices = y.to_list()
  
  Columns= [&quot;AMSR1&quot;, &quot;AMSR2&quot;, &quot;AMSR3&quot;,
             &quot;SMAPL3&quot;, &quot;SMAPL4&quot;, &quot;GLDAS&quot;]
  
  def heatmap(data, row_labels, col_labels, ax=None,
              cbar_kw={}, cbarlabel=&quot;&quot;, **kwargs):
  
      if not ax:
          ax = plt.gca()
  
      im = ax.imshow(data, **kwargs)
      cbar = ax.figure.colorbar(im, ax=ax, **cbar_kw)
      cbar.ax.set_ylabel(cbarlabel, rotation=90, va=&quot;bottom&quot;, fontsize=10,
                         fontweight=&quot;bold&quot;, labelpad=20)
      ax.set_xticks(np.arange(data.shape[1]))
      ax.set_yticks(np.arange(data.shape[0]))
      ax.set_xticklabels(col_labels, fontsize=10, fontweight=&quot;bold&quot;)
      ax.set_yticklabels(row_labels, fontsize=10, fontweight=&quot;bold&quot;)
      ax.tick_params(top=False, bottom=True,
                     labeltop=False, labelbottom=True)
      plt.setp(ax.get_xticklabels(), rotation=90, ha=&quot;right&quot;,
               rotation_mode=&quot;anchor&quot;)
      for edge, spine in ax.spines.items():
          spine.set_visible(False)
      ax.set_xticks(np.arange(data.shape[1]+1)-.5, minor=True)
      ax.set_yticks(np.arange(data.shape[0]+1)-.5, minor=True)
  
      return im, cbar
  
  
  def annotate_heatmap(im, data=None, valfmt=&quot;{x:.2f}&quot;,
                       textcolors=[&quot;black&quot;, &quot;white&quot;],
                       threshold=None, **textkw):
      if not isinstance(data, (list, np.ndarray)):
          data = im.get_array()
  
      if threshold is not None:
          threshold = im.norm(threshold)
      else:
          threshold = im.norm(data.max())/2.
  
      kw = dict(horizontalalignment=&quot;center&quot;,
                verticalalignment=&quot;center&quot;)
      kw.update(textkw)
  
      if isinstance(valfmt, str):
          valfmt = matplotlib.ticker.StrMethodFormatter(valfmt)
  
      texts = []
      for i in range(data.shape[0]):
          for j in range(data.shape[1]):
              kw.update(color=textcolors[int(im.norm(data[i, j]) &gt; threshold)])
              text = im.axes.text(j, i, valfmt(data[i, j], None), **kw)
              texts.append(text)
  
      return texts
      
  fig, ax = plt.subplots()
  im, cbar = heatmap(x, Performance_Indices, farmers, ax=ax,
                     cmap=&quot;jet&quot;, cbarlabel=&quot;Normalized Value&quot;)
  
  ax.set_xlabel('Predictive models', fontsize=15, fontweight=&quot;bold&quot;, labelpad=10)
  ax.set_ylabel('Performance Index', fontsize=15, fontweight=&quot;bold&quot;, labelpad=10)
  
  ax.set_title(&quot;b)&quot;, fontweight=&quot;bold&quot;, pad=20, fontsize=15)
  </code></pre>
  <p>But the figure is look like bellow:</p>
  <p><a href="https://i.stack.imgur.com/XhSzS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XhSzS.jpg" alt="enter image description here" /></a></p>
  <p><strong>HOW CAN I ADJUST THE CELL SIZE SO THAT THE CELLS CAN BE BIGGER, DECIMAL NUMBER CAN BE APPEAR AND THE PLOT LOOK LIKE SOMETHING DECENT!!</strong></p>