Scrolling graph and some functions for the samples