Automated the plotting