Bounding box: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
sets the vertical and horizontal units and the position of the origin such that | sets the vertical and horizontal units and the position of the origin such that | ||
the upper left corner of the drawing panel has position (-5,10) and the lower right | the upper left corner of the drawing panel has position (-5,10) and the lower right | ||
corner of the drawing panel has position (5,2). | corner of the drawing panel has position (5,-2). | ||
<html> | <html> | ||
<source lang="html4script"> | |||
<div id="jxgbox" class="jxgbox" style="width:500px; height:500px;"></div> | |||
</source> | |||
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> | <link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> | ||
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/prototype.js"></script> | <script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/prototype.js"></script> |
Revision as of 22:01, 23 June 2009
We can supply a bounding box to specify the dimensions of the drawing panel. The JavaScript code
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10,5,-2], axis:true});
sets the vertical and horizontal units and the position of the origin such that the upper left corner of the drawing panel has position (-5,10) and the lower right corner of the drawing panel has position (5,-2).