Add grids and legends to the graphs.