1. Seperate tidy function and plot funtion.