Simple Examples for plotLine.js

To use plotLine.js you just need to copy the file plotLine.js to your project and import the script in your HTML:

<script type="text/javascript" src="plotLine.js"></script>

Then your first steps are easy-going:

Plot Data

all it takes is

quickPlot([[0,1.5],[1.5,2.1],[2,0.5],[2.5,2.8],[3,2],[4,3.5]]);

within a script-Tag to get this:

add optional arguments like

{'width':'200px', 'height':'150px', 'color':'red', 'fill':true});

comma-separated after your data to change the appearance:

Plot a Function

To plot a math function it needs to be written as Java-Script.

quickFunc('3*Math.sin(x)', -3.14, 3.14);

creates this plot: