Add cost function plots

Signed-off-by: Mengwen Liu <mengwenliu09@gmail.com>