updating plot