# Data plot: Difference between revisions

From JSXGraph Wiki

A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||

Line 21: | Line 21: | ||

if (y[i]<minY) minY = y[i]; | if (y[i]<minY) minY = y[i]; | ||

} | } | ||

brd.setBoundingBox([- | brd.setBoundingBox([-1,maxY*1.01,maxX*1.05,minY*0.95]); | ||

var c = brd.create('curve',[x,y],{strokeColor:color[nr%color.length]}); | var c = brd.create('curve',[x,y],{strokeColor:color[nr%color.length]}); | ||

nr++; | nr++; | ||

Line 29: | Line 29: | ||

var clearBoard = function() { | var clearBoard = function() { | ||

JXG.JSXGraph.freeBoard(brd); | JXG.JSXGraph.freeBoard(brd); | ||

brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-100,5000, | brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-100,5000,25,-400],axis:true}); | ||

maxX = 0.0; | maxX = 0.0; | ||

maxY = 0.0; | maxY = 0.0; |