improving plotting speed