added figure and r code

added figure and r code