save the graph to png device