Changed to proper way of printing plots.