Skip to content

Commit

Permalink
special plot indices defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Feb 9, 2017
1 parent bcc4d91 commit 6125789
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/solutions/solution_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function interpret_vars(vars,sol)
if vars == nothing
# Default: plot all timeseries
if typeof(sol[1]) <: AbstractArray
vars = collect((0, i) for i in eachindex(sol[1]))
vars = collect((0, i) for i in plot_indices(sol[1]))
else
vars = [(0, 1)]
end
Expand Down Expand Up @@ -260,3 +260,5 @@ function solplot_vecs_and_labels(dims,vars,plot_timeseries,plott,sol,plot_analyt
end
plot_vecs,labels
end

plot_indices(A::AbstractArray) = eachindex(A)

0 comments on commit 6125789

Please sign in to comment.