draw the graph