Cleaned up plot4 script.