Corrected the path of the output file of the plot.
Added code to create a legend in the top right of the plot.
Added the plot created by the output of the plot3.R.