the scroll plot code