Code looks ok, what is wrong with the plot?