Thanks, fixing that already seemed to work. Onto to my next problem: i was following a tutorial when writing a code and i wont get any further errors. Why does it only show a straight line instead of showing the graph. The code is the exact same as in the tutorial.
Without any idea about your actual data and what tutorial you are referring to nobody can tell you much. Chances are the values simply need to be multiplied with a fixed facto to produce distinct peaks and valleys in the graph, but of course there could be any number of other issues just as well.