load r code for plots