Edit in JSFiddle

// Global variables
var c = 0;
var n = 0;
var x = new Array();
var y = new Array(); 
var v = new Array();

function calculateY(c, x) {
    return x * x * x - x + c;
}

function calculate() {
    c = Number($('#c').val());
    var xmin = Number($('#xmin').val());
    var xmax = Number($('#xmax').val());
    var xt = 0;
    
    
    var i = 0;
    for (xt = xmin; xt <= xmax; xt++) {
        x[i] = xt;
        y[i] = calculateY(c, xt);
        v[i] = [x[i], y[i]];
        i++;
    }
    n = i - 1;
    
}

function displayValues()
{
   var s = "";
    
    s = "Y<sup>2</sup> = " + " x<sup>3</sup> - ";
    s+=  " x + " + c + "<br/><br/>";
    
    for (var i = 0; i <= n; i++)
    {
        s += " X = " + x[i] + " Y = " + y[i] + "<br/>";       
    }
    
    output.innerHTML = s;
}

function plotValues()
{
   calculate();
   chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'line',
                marginRight: 130,
                marginBottom: 25
            },
            title: {
                text: 'Elliptic Curve Equation',
                x: -20 //center
            },
            xAxis: {
                title: {
                    text: 'X'
                }
            },
            yAxis: {
                title: {
                    text: 'Y'
                }   
            }, 
       
       plotOptions: {
                scatter: {
                    marker: {
                        radius: 5,
                        states: {
                            hover: {
                                enabled: true,
                                lineColor: 'rgb(0,255,0)'
                            }
                        }
                    },
                    states: {
                        hover: {
                            marker: {
                                enabled: false
                            }
                        }
                    }
                }
            },
       
       series: [{
                name: 'Y Values',
                color: 'rgba(0, 255, 0, .45)',
                data: v
       }]                
   })      
}

$('#calculate').click( function() {
     calculate();
     displayValues();    
});

$('#plot').click( function() {
     calculate();
     plotValues();   
});



Elliptic Curve Equation Calculator<br/><br>
y<sup>2</sup> = x<sup>3</sup> - x + c<br/><br/>

     Input c <input type="text" id="c" size="5" value="5.6"/><br/>
     X Min<input type="text" id="xmin" value="-15" size="5"/>
     X Max<input type="text" id="xmax" value="15" size="5" />
<br/><br/>
    
<input type="button" value="Calculate" id="calculate" />
<input type="button" value="Plot" id="plot" />

<br/><br/>
<p id="output"> </p>  

<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>

              

External resources loaded into this fiddle: