prepare function to display the graph