plots 1-4 and related R source codes