title: Using matplotlib on headless Ubuntu 14.04 Server
body: <p>I have a headless Ubuntu 14.04 Server that I connect to remotely using SSH. I want to use matplotlib and have plots appear at the ssh client. For example, I would connect using:</p>
  
  <pre><code>ssh -X name@server.com
  </code></pre>
  
  <p>And then from a Python console, I want this to produce a plot in a window:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.plot(range(10))
  plt.show()
  </code></pre>
  
  <p>I have installed matplotlib in my virtualenv, and I ran <code>sudo apt-get install python-gtk2</code>, but the plot still doesn't appear. I assume I'm missing lots of packages. What is a fairly minimal set of X-related packages I could install to make this work? I do NOT want to install <code>ubuntu-desktop</code>.</p>