Getting Started


Run the line shown below to install nyaplotjs to your local project.

npm install nyaplot

Try nyaplotjs using Simple API

    <script src=''></script>
    <script src=''></script>
    window.onload = function(){
       // code for plotting from here
    <div id="vis"></div>

Prepare data to visualize.

var xarr=[], yarr1=[], yarr2=[], N=1000, curry1=0.0, curry2=0.0;
for(var i=0;i < N;i++){

Specify div element which svg will be appended to (“vis” in this example) and begin rendering.

var plot = new Nyaplot.Plot({xlabel: "Number of steps"});
var line1 = new Nyaplot.Line(xarr, yarr1, {color: "#fbb4ae"});
var line2 = new Nyaplot.Line(xarr, yarr2, {color: "#b3cde3"});

plot.add([line1, line2]);"vis");

Try more

Read the code here to try more examples.