Added the plot function.