title: No plot displayed by using matplotlib and pandas
body: <p>I needed to make a plot using <code>pandas</code> and <code>matplotlib</code>. I am using <code>python3.9</code> and tried the code in <code>IPython</code>. The <code>matplotlib</code> version is 3.3.2, and that of <code>pandas</code> 1.1.5. What I get, is unreadable text showed in the terminal with no plot being generated. Here is the code:</p>
  <pre><code>#Three lines to make the compiler able to draw:
   import sys
   import matplotlib
   matplotlib.use('Agg')
  
   import pandas as pd
   import matplotlib.pyplot as plt
  
   df = pd.read_csv('data.csv')
  
   df[&quot;Duration&quot;].plot(kind = 'hist')
  
   plt.show()
  
   #Two  lines to make the compiler able to draw:
   plt.savefig(sys.stdout.buffer)
   sys.stdout.flush()
  </code></pre>
  <p>What is the reason behind ?</p>