Update script for plot and histogram