title: Changing fonts in matplotlib
body: <p>So I've tried pretty much everything I could find on stackoverflow (and anywhere else google would lead me) ; and I just can't change the god damn font !</p>
  
  <p>Here comes the non-exhaustive list of what I've tried so far :</p>
  
  <p>Trying as suggested in <a href="https://stackoverflow.com/questions/40734672/how-to-set-the-label-fonts-as-time-new-roman-by-drawparallels-in-python">this question</a> :</p>
  
  <pre><code>import matplotlib.pyplot as plt
  csfont = {'fontname':'Times New Roman'}
  x = [1,2,3]
  y = x
  
  plt.plot(x,y)
  
  plt.title('Please be Times &gt;__&lt;',**csfont)
  
  plt.show()
  </code></pre>
  
  <p>gives me this error log :</p>
  
  <pre><code>&gt;&gt;&gt; (executing file "&lt;tmp 1&gt;")
  Note on using QApplication.exec_():
  The GUI event loop is already running in the pyzo kernel, and exec_()
  does not block. In most cases your app should run fine without the need
  for modifications. For clarity, this is what the pyzo kernel does:
  - Prevent deletion of objects in the local scope of functions leading to exec_()
  - Prevent system exit right after the exec_() call
  /home/antoine/miniconda3/lib/python3.6/site-packages/matplotlib/font_manager.py:1297: UserWarning: findfont: Font family ['Times New Roman'] not found. Falling back to DejaVu Sans
    (prop.get_family(), self.defaultFamily[fontext]))
  
  &gt;&gt;&gt; 
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/21321670/how-to-change-fonts-in-matplotlib-python/38622960#38622960">This answer</a> didn't quite help me either :</p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.rcParams["font.family"] = "Times New Roman"
  x = [1,2,3]
  y = x
  
  plt.plot(x,y)
  
  plt.title('Please be Times &gt;__&lt;',**csfont)
  
  plt.show()
  </code></pre>
  
  <p>There is no error shown ; but this is not Times ...</p>
  
  <p><img src="https://i.stack.imgur.com/2l5M6.png" alt="Still not Times"></p>
  
  <p>It's also a bit wierd to me that the first attempt gives that error log, as doing what <a href="https://stackoverflow.com/questions/18821795/how-can-i-get-list-of-font-familyor-name-of-font-in-matplotlib/18821968#18821968">this answer</a> suggests shows that Times New Roman is indeed a font I should be able to use :</p>
  
  <pre><code>&gt;&gt;&gt; set([f.name for f in matplotlib.font_manager.fontManager.afmlist])
  {'Courier', 'Times', 'URW Bookman L', 'Nimbus Mono L', 'ITC Bookman', 'ZapfDingbats', 'Century Schoolbook L', 'New Century Schoolbook', 'Helvetica', 'Standard Symbols L', 'Utopia', 'Palatino', 'URW Gothic L', 'Courier 10 Pitch', 'Symbol', 'Computer Modern', 'Bitstream Charter', 'ITC Avant Garde Gothic', 'Nimbus Roman No9 L', 'ITC Zapf Chancery', 'ITC Zapf Dingbats', 'URW Chancery L', 'Nimbus Sans L', 'Dingbats', 'URW Palladio L'}
  </code></pre>
  
  <p>So ... What else can I try ?</p>