Trouble with graph

First, stop drawing your graph as a shape. You shouldn’t need to use beginShape() or vertex() - just use line() to draw the lines from one data point to the next.

It’s unclear what you want to do by having the higher end of the line be on the left. Did you want to flip the graph? Draw the data in reverse order? Skew the data?