Skip to content

Port Plots.jl recipe features to Makie recipe for AbstractTimeseriesSolution #1064

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asinghvi17
Copy link
Contributor

Summary

This PR ports missing functionality from the Plots.jl recipe to the Makie recipe for AbstractTimeseriesSolution, bringing them to feature parity.

Changes

  • Discrete Variable Support: Added support for plotting discrete variables with stepped lines (dashed style with markers)
  • Analytical Solution Plotting: Added plot_analytic support to show analytical solutions alongside numerical ones (with dashed lines)
  • Plottable Indices: Added plottable_indices function for proper default index selection
  • Empty Data Handling: Properly handles cases with no data to plot
  • Dense/Sparse Output: Uses SciMLBase.isdenseplot for correct dense vs sparse determination

Implementation Details

The main changes are in ext/SciMLBaseMakieExt.jl:

  1. Variables are now separated into continuous and discrete based on their timeseries indexes
  2. Discrete variables are rendered as stepped lines with dashed style and circle markers
  3. Analytical solutions (when plot_analytic=true) are shown with dashed lines
  4. Empty data cases return empty PlotSpec arrays
  5. Uses the correct default indices via plottable_indices

All features are implemented using Makie's PlotSpec API within the constraints of convert_arguments.

Testing

This needs testing with:

  • Solutions containing both continuous and discrete variables
  • Solutions with analytical solutions available
  • Edge cases (empty data, single points, etc.)

🤖 Generated with Claude Code

…olution

- Add support for discrete variable plotting with stepped lines
- Add plottable_indices function for proper default index selection
- Add plot_analytic support to show analytical solutions with dashed lines
- Add proper empty data handling
- Use SciMLBase.isdenseplot for dense/sparse output determination
- Separate continuous and discrete variables based on timeseries indexes

This brings the Makie recipe to feature parity with the Plots.jl recipe,
enabling proper visualization of mixed continuous/discrete solutions and
analytical comparisons.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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.

1 participant