plot3 -- plot with legend

Add legend to graph.  Also found a bug in plot1.R and plot2.R