plot.js is a canvas based, one function, no dependency library to create plots of functions by Alexandre Stanislawski (@bobylito) under MIT licence. The code can be found on github and the documentation is there.
jsPlot( "plotHere", { Xmin : -5, Xmax : 5, Ymin : -5, Ymax : 5, canvasHeight : 250, canvasWidth : 250 }, [function x(x){return x}, function x2(x){return x*x}] );
jsPlot( "plotThere", { Xmin : -5, Xmax : 5, Ymin : -5, Ymax : 5, canvasHeight : 250, canvasWidth : 250, gridVisible : false }, [function x3(x){ return x*x*x }, function q(x){return 1/x}] );
var f1 = function x3(x){ return x*x*x }, f2 = function q(x){ return x * Math.cos(x) } f1.color="#F00" f2.color="#00B" jsPlot( "plotColors", { Xmin : -10, Xmax : 10, Ymin : -10, Ymax : 10, canvasHeight : 500, canvasWidth : 500, gridVisible : false }, [f1, f2] );