title: Python matplotlib code hangs on plt.plot()
body: <p>When I try to use certain functions from matplotlib, my code gets stuck at those functions. For example, if I try to run</p>
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  fig = plt.figure()
  
  x = np.random.randint(0, 10, 10)
  y = np.random.randint(0, 10, 10)
  
  plt.plot(x, y)
  plt.show()
  </code></pre>
  <p>It succesfully runs plt.figure(), but the execution of the code gets stuck at plt.plot(x, y). No error codes are produced, and I can't interrupt execution using ctrl+c.</p>
  <p>I work on Linux Mint 5.4.0-70-generic and I use miniconda for my python installation. I have python3.9 installed with the newest matplotlib and numpy packages. I already completely re-installed conda and python <a href="https://stackoverflow.com/a/62837862">using tsveti_iko's answer</a> (my previous version was python3.8, which gave the exact same issue). Up until today, everything worked perfectly.</p>
  <p>EDIT: The only thing that I did before it stopped working is that I updated my os using apt-get update &amp; apt-get upgrade. But I don't know if this could cause my above issue.</p>
  <p>If I use</p>
  <pre><code>import logging
  logging.basicConfig(level=logging.DEBUG)
  </code></pre>
  <p>I get the following output:</p>
  <pre><code>DEBUG:matplotlib:matplotlib data path: 
  /home/sjoerd/miniconda3/lib/python3.9/site-packages/matplotlib/mpl-data
  DEBUG:matplotlib:CONFIGDIR=/home/sjoerd/.config/matplotlib
  DEBUG:matplotlib:matplotlib version 3.4.3
  DEBUG:matplotlib:interactive is False
  DEBUG:matplotlib:platform is linux
  DEBUG:matplotlib:loaded modules: [(whole list of modules loaded, not shown here)]
  DEBUG:matplotlib:CACHEDIR=/home/sjoerd/.cache/matplotlib
  DEBUG:matplotlib.font_manager:Using fontManager instance from /home/sjoerd/.cache/matplotlib/fontlist-v330.json
  DEBUG:matplotlib.pyplot:Loaded backend qt5agg version unknown.
  DEBUG:matplotlib.pyplot:Loaded backend Qt5Agg version unknown.
  </code></pre>