Difference between revisions of "Data plot"

From JSXGraph Wiki
Jump to navigationJump to search
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 01:28, 12 February 2010