title: matplotlib/IPython Notebook creates empty PNG or PDF image
body: <p>This code produces a boxplot using matplotlib. The plot is shown correctly in the IPython Notebook (see attached image). However, <code>savefig</code> creates an empty image. I tried the file endings <code>.png</code> and <code>.pdf</code>, but this happens with both. What is wrong with the code?</p>
  
  <pre><code>fig = matplotlib.pyplot.gcf()
  
  
  GCEMA     = (0.26, 0.26, 0.30, 0.51, 0.55, 0.34)
  CEM       = (0.26, 0.23, 0.30, 0.49, 0.35, 0.24)
  selSCAN   = (0.19, 0.35, 0.28, 0.45, 0.41, 0.52)
  selSCANAD = (0.26, 0.52, 0.37, 0.46, 0.46, 0.47)
  N=6
  pos = np.arange(N)
  ax = plt.axes()
  
  ax.bar(0.6*pos, GCEMA, width = 0.10, color='green', label='GCE-MA')
  ax.bar(0.6*pos+0.1, CEM, 0.10, color='blue', label='CE-M')
  ax.bar(0.6*pos+0.2, selSCAN, 0.10, color='red', label='selSCAN-ND')
  ax.bar(0.6*pos+0.3, selSCANAD, 0.10, color='yellow', label='selSCAN-AD')
  ylabel("quality [$\phi$]", fontsize=14)
  fig.set_size_inches(5,4)
  xticks(rotation=15)
  xticks([0.2,0.8,1.4,2,2.6,3.2],['PGP','CAIDA','coPapersDBLP','soc-LiveJournal','uk-2002','eu-2005'])
  legend(loc=4, fontsize=10)
  show()
  savefig("cond.png")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/3SYS5.png" alt="enter image description here"></p>