SciMLBase.jl icon indicating copy to clipboard operation
SciMLBase.jl copied to clipboard

Port Plots.jl recipe features to Makie recipe for AbstractTimeseriesSolution

Open asinghvi17 opened this issue 5 months ago • 0 comments

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

asinghvi17 avatar Jul 10 '25 21:07 asinghvi17