Difference between revisions of "Ticks"

From JSXGraph Wiki
Jump to navigationJump to search
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*i;}], {strokeColor:'green',majHeight:120});
+
brd1.createElement('ticks',[ax1,function(i){ return (Math.PI*i).toFixed(2);}], {strokeColor:'green',majHeight:120});
 
brd1.fullUpdate=true; brd1.update(); brd1.fullUpdate=false;  
 
brd1.fullUpdate=true; brd1.update(); brd1.fullUpdate=false;  
 
</jsxgraph>
 
</jsxgraph>

Revision as of 11:17, 13 March 2009