Skip to content

Add plot recipes for NDInterpolation up to 3D#46

Open
vankaSiddhartha wants to merge 1 commit into
SciML:mainfrom
vankaSiddhartha:feature/ndinterpolation-plot-recipes
Open

Add plot recipes for NDInterpolation up to 3D#46
vankaSiddhartha wants to merge 1 commit into
SciML:mainfrom
vankaSiddhartha:feature/ndinterpolation-plot-recipes

Conversation

@vankaSiddhartha

Copy link
Copy Markdown

Summary

This PR adds plotting recipes for NDInterpolation, inspired by the dimensional dispatch strategy used in SplineGrids.jl. The goal is to provide lightweight visualization support while keeping interpolation logic unchanged.

What’s included

  • Plot recipes dispatched on the number of input dimensions:
    • 1D input → line plots (supports scalar and vector-valued outputs)
    • 2D input → surface plots
    • 3D input → surface slice visualization
  • Output dimensionality is inferred at runtime from evaluated data.
  • Uses only public APIs: eval_unstructured, eval_grid, and interp_dims.

Design notes

  • Visualization support is intentionally limited to 3 input dimensions to keep plots readable, stable, and backend-agnostic.
  • For 3D interpolations, a slice-based surface plot is used instead of volume rendering.
  • Changes are purely additive and do not modify existing behavior or public APIs.

Related issue

Closes #18

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the contributor guidelines, in particular the SciML Style Guide and COLPRAC
  • Any new documentation only uses public API

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.

Add plotting recipes

1 participant