Added close(figno) to a couple of plots to stop duplicate legend issues