updated plot4.r to save graph as png