updated graph plotting