fixing syntax errors in plot.js