Added plotting function. It's not too fancy but it works.