1

I am using function-plot in JS to plot input function and also its derivative function. I wanted to change color of that derivative in plot.

These are my parameters for plot. I can change color for sin(x) by adding color:"red", but if I want to change color of derivative by putting color:... in derivative bloc it didnt work. How can I do it?

var parameters = {
  target: '#myFunction',
  data: [{
    fn: 'sin(x)',
    derivative: {
      fn: "cos(x)",
      x0: 5,
    }
  }],
  grid: true,
  yAxis: {
    domain: [-1, 1]
  },
  xAxis: {
    domain: [0, 2 * Math.PI]
  }
};

I want that light blue line to be different color:

enter image description here

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Maestro
  • 11
  • 2

0 Answers0