From 192cfdfbb79462536ced149e57190cf8bad90bd0 Mon Sep 17 00:00:00 2001 From: Lucas Morton <23484003+lamorton@users.noreply.github.com> Date: Thu, 20 May 2021 16:38:25 -0700 Subject: [PATCH] Fixes https://github.com/SciML/ModelingToolkit.jl/issues/1018. --- src/solutions/solution_interface.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solutions/solution_interface.jl b/src/solutions/solution_interface.jl index a281a4d34..0534e2bd4 100644 --- a/src/solutions/solution_interface.jl +++ b/src/solutions/solution_interface.jl @@ -344,7 +344,7 @@ function diffeq_to_arrays(sol,plot_analytic,denseplot,plotdensity,tspan,axis_saf # Plot for sparse output: use the timeseries itself if sol.tslocation == 0 plott = sol.t - plot_timeseries = sol.u + plot_timeseries = DiffEqArray(sol.t, sol.u) if plot_analytic plot_analytic_timeseries = sol.u_analytic else @@ -357,7 +357,7 @@ function diffeq_to_arrays(sol,plot_analytic,denseplot,plotdensity,tspan,axis_saf plott = collect(densetspacer(tspan[1],tspan[2],plotdensity)) end - plot_timeseries = sol.u[start_idx:end_idx] + plot_timeseries = DiffEqArray(sol.t[start_idx:end_idx], sol.u[start_idx:end_idx]) if plot_analytic plot_analytic_timeseries = sol.u_analytic[start_idx:end_idx] else