R scripts and generated png file for Plot4