Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an option to set starting point on X axis. #16

Merged
merged 1 commit into from
Nov 1, 2020
Merged

Added an option to set starting point on X axis. #16

merged 1 commit into from
Nov 1, 2020

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