Even simpler function plotter: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 2: Line 2:
<input type="text" id="input" value="sin(x)*x">
<input type="text" id="input" value="sin(x)*x">
<input type="button" value="plot" onClick="plotter()">
<input type="button" value="plot" onClick="plotter()">
<input type="button" value="clear all" onClick="board=clearAll(board)">
</form>
</form>
</html>
</html>
Line 12: Line 13:
   board.create('functiongraph',[f]);
   board.create('functiongraph',[f]);
}
}
function clearAll(board) {
    JXG.JSXGraph.freeBoard(board);
    board = JXG.JSXGraph.initBoard('box', {boundingbox:[-5,8,8,-5], unitY: 40});
    p = board.create('point', [3,-4], {style:6, name:'p'});
    return board;
}
</jsxgraph>
</jsxgraph>

Revision as of 16:42, 22 March 2010