generates appropriate plots