-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Automatic Adaptive Plotting of Functions Needs Work #4106
Comments
Related: #3894. |
@t-bltg Thanks. Let's make sure we don't get hung up on sinc. It's not hard to find failing cases. plot(x -> cos(20.0 * x) * exp(-x), xlims = (0.0, 10.0)) And it's not just oscillating functions; my first example didn't display a plot at all, and that's a super simple function. I saw a thread from a few years ago where the devs were trying to mimic Mathematica's adaptve plotter. This isn't finished work. |
That function lives here and improvements are welcome! |
@BeastyBlacksmith How is this not a bug? Please reconsider. |
This is not a bug per se, but a limitation in the mentioned algorithm: we only need a finer / better distributed 1D grid for evaluating the functions. |
The adaptive function plotter in Julia is not very robust and can't be trusted even with simple functions. Consider the following simple cases made with Julia 1.6.3 and the gr backend.
Consider the following function:
Then the following bit works OK:
with this result:
but this bit
fails as such
![oops s = 3](https://user-images.githubusercontent.com/74484484/154583453-f4ba8e28-31e3-4648-bfee-6cf67c26b31f.png)
For another failure on a simple plot, consider
which looks nice
![yay sinc](https://user-images.githubusercontent.com/74484484/154583739-cdab4775-e111-4f89-965d-6719159ffce7.png)
but simply changing the plot limits
causes this failure:
![oops sinc](https://user-images.githubusercontent.com/74484484/154583811-2bf6bb34-fbb1-40ba-959d-25faf96e89ac.png)
The text was updated successfully, but these errors were encountered: