Difference between revisions of "Polar grid"

From JSXGraph Wiki
Jump to navigationJump to search
Line 2: Line 2:
 
var board = JXG.JSXGraph.initBoard('jxgbox', {axis:false, boundingbox:[-5, 5, 5, -5]});
 
var board = JXG.JSXGraph.initBoard('jxgbox', {axis:false, boundingbox:[-5, 5, 5, -5]});
  
var ax1 = board.create('axis', [[0,0], [1,0]], {ticks: {type: 'polar', label: {offset:[0, -3], anchorX: 'middle', anchorY: 'top'}}});
+
var ax1 = board.create('axis', [[0,0], [1,0]], {
var ax2 = board.create('axis', [[0,0], [0,1]], {ticks: {majorHeight: 0, minorHeight: -5, label: {visible: true, offset: [-6, 0], anchorY: 'middle', anchorX: 'right'}}});
+
    ticks: {
 +
        type: 'polar',  
 +
        label: {
 +
            offset:[0, -3],  
 +
            anchorX: 'middle',  
 +
            anchorY: 'top'
 +
        }
 +
    }
 +
});
 +
var ax2 = board.create('axis', [[0,0], [0,1]], {
 +
    ticks: {
 +
        majorHeight: 0,  
 +
        tickEndings: [1, 0],
 +
        label: {
 +
            visible: true,  
 +
            offset: [-6, 0],  
 +
            anchorY: 'middle',  
 +
            anchorX: 'right'
 +
        }
 +
    }
 +
});
  
 
</jsxgraph>
 
</jsxgraph>

Revision as of 11:39, 31 March 2020

The underlying JavaScript code