Added plots to watch the variation of the cost