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

More flexible plot recipe #128

Closed
nathanaelbosch opened this issue Nov 13, 2023 · 0 comments
Closed

More flexible plot recipe #128

nathanaelbosch opened this issue Nov 13, 2023 · 0 comments

Comments

@nathanaelbosch
Copy link
Contributor

nathanaelbosch commented Nov 13, 2023

Now that WorkPrecision contains not just a single error and runtimes, but also solver stats like the number of function evaluations, discrete step sizes for non-adaptive solvers, and a range of computed errors, we should provide some convenient functionality to plot these.

Example use-cases I see are

  • Specifying which error to plot against runtime (currently it plots the one saved in wp.error_estimate, but it could be l2, final, ...)
  • Plotting error against dts for fixed-step solvers (currently possible with view=:dt_convergence; maybe a more general API would simplify the code?)
  • Plotting error against stats.nf (as already requested back in 2020 in feval vs error plot #64)
  • Plotting one error against another one (particularly relevant for the probabilistic solvers in ProbNumDiffEq.jl as to evaluate calibration we plot a calibration metric agains an error)
  • Plotting tolerances against error

How should the API look?

I'm not quite sure about this, but maybe simple x::Symbol and y::Symbol keyword arguments would be enough?
Something along the lines of

@recipe function f(
    wp_set::WorkPrecisionSet;
    x::Symbol = wp_set.error_estimate,
    y::Symbol = :times,
    view = :benchmark,
    color = nothing
    )

and then the x and y data would get filled with the corresponding values.

What do you think, would this make sense? I will try to see if I can get a minimal example working soon., and open a corresponding draft PR.

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

2 participants