updating plot ranges