Data plot: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 2: Line 2:
var color = ['blue','red','yellow', 'magenta', 'green', 'black'];
var color = ['blue','red','yellow', 'magenta', 'green', 'black'];
var nr = 0;
var nr = 0;
var maxX = 0.0;
var maxY = 0.0;


var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-100,5000,25000,-400],axis:true});
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-100,5000,25000,-400],axis:true});
Line 9: Line 11:
     var t = document.getElementById('in_data').value;
     var t = document.getElementById('in_data').value;
     var data = t.split('\n');
     var data = t.split('\n');
    var maxX = 0.0;
    var maxY = 0.0;
     for (i=0;i<data.length;i++) {
     for (i=0;i<data.length;i++) {
         d = data[i].split(';');
         d = data[i].split(';');
Line 26: Line 26:
     JXG.JSXGraph.freeBoard(brd);  
     JXG.JSXGraph.freeBoard(brd);  
     brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-100,5000,25000,-400],axis:true});
     brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-100,5000,25000,-400],axis:true});
    maxX = 0.0;
    maxY = 0.0;
}
}
var clearInput = function() {
var clearInput = function() {

Revision as of 23:28, 11 February 2010