Write graph.