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

Small X-axis increments are not plotted correctly #365

Open
2 of 8 tasks
aWZHY0yQH81uOYvH opened this issue Aug 6, 2023 · 0 comments
Open
2 of 8 tasks

Small X-axis increments are not plotted correctly #365

aWZHY0yQH81uOYvH opened this issue Aug 6, 2023 · 0 comments

Comments

@aWZHY0yQH81uOYvH
Copy link

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
Small x-axis increments are skipped/averaged together to create a stair-stepped plot. I assume there is an epsilon constant somewhere which should probably be set much smaller than 1e-5 (or made to be dynamic with the given x values).

Steps to Reproduce

vector<double> x = linspace(0, 1e-4, 1000);
plot(x, transform(x, [](double x) {return sin(2*M_PI*1e4*x);}));
show();

Output

badsine_dark

If 1e-4 is replaced with 1 in the above code, the result is correct.
oksine_dark

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: macOS
  • OS Version: 13.5
  • Compiler: clang
  • Compiler version: 14.0.3
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

No branches or pull requests

1 participant