Skip to content

Conversation

kibotrel
Copy link
Contributor

When you want to plot a real math function it is better to at least specify the right X,Y coordinates for a specific point. So by setting the offset on X axis to match what you want to plot, you'll end up with a correct graph.

In this use case I'm assuming you're plotting your y values as follow:

const data = []

for (let x = -25; x < 25; x += 1) {
  const y = someFunction(x)

  data.push(y)
}

As i start computing from x = -25, this option x_begin must be set on -25 as well.

@richardeoin
Copy link
Owner

Looks good to me, thanks!

@richardeoin richardeoin merged commit f2dc132 into richardeoin:master Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants