diff --git a/src/solutions/solution_interface.jl b/src/solutions/solution_interface.jl index bdbd8c51f..dfa5ce9ab 100644 --- a/src/solutions/solution_interface.jl +++ b/src/solutions/solution_interface.jl @@ -294,23 +294,18 @@ DEFAULT_PLOT_FUNC(x, y, z) = (x, y, z) # For v0.5.2 bug ts = ts[tstart:tend] vals = getp(sol, idx)(sol, tstart:tend) - # Scatterplot of points - @series begin - seriestype := :scatter - linestyle --> :dash - label --> string(hasname(idx) ? getname(idx) : idx) - ts, vals - end - @series begin seriestype := :line linestyle --> :dash - label := nothing + markershape --> :o + markersize --> repeat([2, 0], length(ts)-1) + markeralpha --> repeat([1, 0], length(ts)-1) + label --> string(hasname(idx) ? getname(idx) : idx) - xvals = collect(Iterators.flatten(zip(ts, ts)))[2:end] - yvals = collect(Iterators.flatten(zip(vals, vals)))[1:end-1] - xvals, yvals + x = vec([ts[1:end-1]'; ts[2:end]']) + y = repeat(vals, inner=2)[1:end-1] + x, y end end end