Difference between revisions of "Even simpler function plotter"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
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 18:42, 22 March 2010