I have the code to generate a sine wave in the javascript library- function-plot:
functionPlot({
target: '#domain',
yAxis: {domain: [-1, 1]},
xAxis: {domain: [8, 24]},
data: [{
fn: 'sin(x)'
}]
})
But it doesn't generate a graph when I plot sin(kx-wt) which is what needed for a moving wave.
I think the library only takes in strings
as inputs.
Is there any way to bypass this and generate a plot of a function containing variables?