Added a demo plot function and plotted the variation of cost function wrt theta