Added legend code to plot3.R and regenerated image