title: Why are my plots in matplotlib not showing the axes
body: <p>I am having trouble with my plots as the axes labels seem to show in Jupyter Notebooks when I was working on it. </p>
  
  <p>However, when I exported the file to a .py file and ran it in terminal, the charts given do not have the axes labels..</p>
  
  <pre><code>fig = plt.figure(figsize = (15,5))
  
  ax = fig.add_axes([0,0,1,1])
  ax.set_title('Oil vs Banks Mean Return')
  ax.set_xlabel('Date')
  ax.set_ylabel('Price')
  
  ax.plot(all_returns['Mean'], label = 'Banks Mean', color = 'green')
  ax.plot(all_returns['Oil'], label = 'Oil', color = 'black')
  ax.plot(movavg['Mean'], label = 'Mean MA', color = 'blue')
  ax.plot(movavg['Oil'], label = 'OIL MA', color = 'red')
  
  ax.legend()
  
  plt.tight_layout();
  </code></pre>
  
  <p>In Jupyter Notebooks it shows the axes and labels eg. Year etc.:
  <img src="https://i.stack.imgur.com/ugZpB.png" alt="In Jupyter Notebooks it shows the axes and labels eg. Year etc."></p>
  
  <p>However, when I export it, they are gone:
  <img src="https://i.stack.imgur.com/BcKYy.png" alt="However, when I export it, they are gone"></p>