Added plot penalty function.