Plotting with javascript kind of works