How to make a moving graph in Javascript P5

Help!!!