Ticks: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
brd1.createElement('ticks',[ax1,0.5], {majorTicks:3,majHeight:80,minHeight:3,strokeColor:'red'}); | brd1.createElement('ticks',[ax1,0.5], {majorTicks:3,majHeight:80,minHeight:3,strokeColor:'red'}); | ||
brd1.createElement('ticks',[ax1,[-2,4.2]], {strokeColor:'black'}); | brd1.createElement('ticks',[ax1,[-2,4.2]], {strokeColor:'black'}); | ||
brd1.createElement('ticks',[ax1,function(i){ return (Math.PI | brd1.createElement('ticks',[ax1,function(i){ return (Math.PI).toFixed(2);}], {strokeColor:'green',majHeight:120}); | ||
brd1.fullUpdate=true; brd1.update(); brd1.fullUpdate=false; | brd1.fullUpdate=true; brd1.update(); brd1.fullUpdate=false; | ||
</jsxgraph> | </jsxgraph> | ||
Line 13: | Line 13: | ||
brd1.createElement('ticks',[ax1,0.5], {majorTicks:3,majHeight:80,minHeight:3,strokeColor:'red'}); | brd1.createElement('ticks',[ax1,0.5], {majorTicks:3,majHeight:80,minHeight:3,strokeColor:'red'}); | ||
brd1.createElement('ticks',[ax1,[-2,4.2]], {strokeColor:'black'}); | brd1.createElement('ticks',[ax1,[-2,4.2]], {strokeColor:'black'}); | ||
brd1.createElement('ticks',[ax1,function(i){ return (Math.PI | brd1.createElement('ticks',[ax1,function(i){ return (Math.PI);}], {strokeColor:'green',majHeight:120}); | ||
brd1.fullUpdate=true; brd1.update(); brd1.fullUpdate=false; | brd1.fullUpdate=true; brd1.update(); brd1.fullUpdate=false; | ||
</source> | </source> | ||
[[Category:Examples]] | [[Category:Examples]] |
Revision as of 18:27, 13 March 2009
var brd1 = JXG.JSXGraph.initBoard('box1', {originX: 350, originY: 100, unitX: 40, unitY: 40});
var ax1 = brd1.createElement('axis', [[0,0],[1,0]]);
brd1.createElement('ticks',[ax1,0.5], {majorTicks:3,majHeight:80,minHeight:3,strokeColor:'red'});
brd1.createElement('ticks',[ax1,[-2,4.2]], {strokeColor:'black'});
brd1.createElement('ticks',[ax1,function(i){ return (Math.PI);}], {strokeColor:'green',majHeight:120});
brd1.fullUpdate=true; brd1.update(); brd1.fullUpdate=false;