Save the graph as an image