transfered data ploting in own function