SciMLBase.jl
SciMLBase.jl copied to clipboard
Port Plots.jl recipe features to Makie recipe for AbstractTimeseriesSolution
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_analyticsupport to show analytical solutions alongside numerical ones (with dashed lines) - Plottable Indices: Added
plottable_indicesfunction for proper default index selection - Empty Data Handling: Properly handles cases with no data to plot
- Dense/Sparse Output: Uses
SciMLBase.isdenseplotfor correct dense vs sparse determination
Implementation Details
The main changes are in ext/SciMLBaseMakieExt.jl:
- Variables are now separated into continuous and discrete based on their timeseries indexes
- Discrete variables are rendered as stepped lines with dashed style and circle markers
- Analytical solutions (when
plot_analytic=true) are shown with dashed lines - Empty data cases return empty PlotSpec arrays
- 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