Remove some references before plotting the graph.