jsxgraph axis and label opacity
HTML
<link rel="stylesheet" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css">
<script src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
<div id='box' class='jxgbox'></div>
CSS
#box {
width:500px;
height:500px;
}
JavaScript
var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-10, 10, 10, -10]});
var N = board.create('slider', [[0,1.5],[3,1.5],[1,3,40]], {name:'n',snapWidth:1});
var c = board.create('curve', [[0],[0]],{strokecolor:'red', strokeWidth:2});
c.updateDataArray = function() {
var r = 1, n = Math.floor(N.Value()),
x = [0], y = [0],
phi = Math.PI/n,
h = r*Math.cos(phi),
s = r*Math.sin(phi),
i, j,
px = 0, py = 0, sgn = 1,
d = 16,
dt = phi/d,
pt;
for (i = 0; i < n; i++) {
for (j = -d; j <= d; j++) {
pt = dt*j;
x.push(px + r*Math.sin(pt));
y.push(sgn*r*Math.cos(pt) - (sgn-1)*h*0.5);
}
px += s;
sgn *= (-1);
}
x.push((n - 1)*s);
y.push(h + (sgn - 1)*h*0.5);
this.dataX = x;
this.dataY = y;
}