title: How to hide figure size when plotting a figure with matplotlib
body: <p>I wrote the following function to plot a confusion matrix in Python/matplotlib:</p>
  
  <pre><code>def print_conf_mat(y_test, y_pred):
  conf_mat = confusion_matrix(y_test, y_pred)
  classes = ['Normal', 'Type 1', 'Type 2', 'Type 3', 'Type 4', 'Type 5', 'Type 6']
  imshow(conf_mat, interpolation='nearest', cmap=cm.Blues)
  print('Confusion matrix:')
  colorbar()
  tick_marks = arange(len(classes))
  xticks(tick_marks, classes, rotation=45)
  yticks(tick_marks, classes)
  fmt = 'd'
  thresh = conf_mat.max() / 2.
  for i, j in product(range(conf_mat.shape[0]), range(conf_mat.shape[1])):
      text(j, i, format(conf_mat[i, j], fmt),
               horizontalalignment="center",
               color="white" if conf_mat[i, j] &gt; thresh else "black")
  xlabel('Predicted label')
  ylabel('True label')
  tight_layout()
  figure()
  show()
  </code></pre>
  
  <p>I get the matrix in the following format:</p>
  
  <p><a href="https://i.stack.imgur.com/aoyNR.png" rel="noreferrer">Confusion matrix plotted with matplotlib</a></p>
  
  <p>I'd like to get rid of the annoying line that says </p>
  
  <pre><code>&lt;Figure size 432x288 with 0 Axes&gt;
  </code></pre>
  
  <p>Any clues on how I achieve this?</p>