title: Speeding up Matplotlib
body: <p>Currently I am working on a real-time plot but the visualization is really slow. I would like to know what things in general you can do to speed up things in Matplotlib:</p>
  
  <ul>
  <li>How does the backend affect the performance? Are there backends that
  are better for real time plotting than others?  </li>
  <li>Can I lower the resolution to increase FPS?  </li>
  <li>Why does the FPS of my plot increase if I reduce the window size? Why
  does FPS drop dramatically if I switch to full screen mode?</li>
  </ul>
  
  <p>I also tried to turn off everything I don't need:</p>
  
  <pre><code>ax.set_xticklabels(())
  ax.set_yticklabels(())
  ax.set_xticks([])
  ax.set_yticks([])
  ax.axis('off')
  ax.get_xaxis().set_visible(False)
  ax.get_yaxis().set_visible(False)
  </code></pre>
  
  <p>However, the effect is negligible. Are there more things I can turn off?</p>
  
  <p>I would also like to know if it is possible to turn off the buttons (home button, etc.., see below) of the window that opens when creating a graph. May turning off these buttons increase the speed?</p>
  
  <p><a href="https://i.stack.imgur.com/lUNSn.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/lUNSn.jpg" alt="enter image description here"></a></p>
  
  <p>I also found that doing the following</p>
  
  <pre><code>fig.canvas.draw_idle()
  fig.canvas.start_event_loop(1e-9)
  </code></pre>
  
  <p>is much slower for updating the plot than</p>
  
  <pre><code>fig.canvas.draw_idle()
  self.fig.canvas.update()
  self.fig.canvas.flush_events()
  </code></pre>
  
  <p>Are there even better ways to update the objects in a plot?</p>