A functiongraph of y=x and y=-x when x is greater than 0

						JXG.Options.axis.ticks.insertTicks = false;
JXG.Options.axis.ticks.ticksDistance = 10;
var board = JXG.JSXGraph.initBoard('box1', {
boundingbox: [-10, 10, 10, -10],showcopyright: false,showNavigation: false,axis: true,defaultAxes: {
    y: { 
	ticks: {majorHeight: 5 },
	withLabel:true,
    name: 'Y',
      label: {
        position: 'rt',
        offset: [10, -10]
      }
	},
	x: { 
	ticks: {majorHeight: 5 },
	name: 'X',
    withLabel: true,
    label: {
        position: 'rt',
      offset: [-10, -15]
    } },
  }, 
});
var f1 = board.create('functiongraph',[function(x){ return x;}, 0, 8]); 
var f2 = board.create('functiongraph',[function(x){ return -x;}, 0, 8]);					

The image appears in the following posts

Triangle posted 1 year ago

Scroll to Top