That looks correct and works for me.
(though I am likely using different versions of
networkx and matplotlib than you).
e.g.
>>> import networkx as nx
>>> G=nx.path_graph(4)
>>> nx.draw(G)
>>> import matplotlib.pyplot as plt
>>> plt.savefig('figure.png')
produces an image of the path graph.
Does this work for other matplotlib plots?
e.g.
>>> plt.plot([1,2,3])
>>> plt.savefig('figure.png')
If not then there is some issue with matplotlib...
Aric