title: How to run these 2 commands together in python?
body: <p>I have this code in Spyder (Python 3.7):</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  #%% Práctica 1 
  %reset -f
  plt.close("all")
  </code></pre>
  
  <p>If I only run one of the commands (any of them) works well, but I can't run both of them at the same time (Then, I get the error <code>name 'plt' is not defined</code> althought I have run the import command). I don't have any clue about what can happen.</p>
  
  <p>I hope someone can help me. Thank you for your answers.</p>