@@ -61,7 +61,7 @@ DEFAULT_PLOT_FUNC(x,y,z) = (x,y,z) # For v0.5.2 bug
61
61
denseplot = (sol. dense ||
62
62
typeof (sol. prob) <: AbstractDiscreteProblem ) &&
63
63
! (typeof (sol) <: AbstractRODESolution ) &&
64
- ! (hasfield (typeof (sol),:interp ) &&
64
+ ! (hasfield (typeof (sol),:interp ) &&
65
65
typeof (sol. interp) <: SensitivityInterpolation ),
66
66
plotdensity = min (Int (1e5 ),sol. tslocation== 0 ?
67
67
(typeof (sol. prob) <: AbstractDiscreteProblem ?
@@ -95,10 +95,10 @@ DEFAULT_PLOT_FUNC(x,y,z) = (x,y,z) # For v0.5.2 bug
95
95
if getindex .(int_vars,1 ) == zeros (length (int_vars)) || getindex .(int_vars,2 ) == zeros (length (int_vars))
96
96
xguide --> " t"
97
97
end
98
- if length (int_vars[ 1 ] ) >= 3 && getindex .(int_vars, 3 ) == zeros ( length ( int_vars) )
98
+ if all (x -> length (x ) >= 3 && x[ 4 ] == 0 , int_vars)
99
99
yguide --> " t"
100
100
end
101
- if length (int_vars[ 1 ] ) >= 4 && getindex .(int_vars, 4 ) == zeros ( length ( int_vars) )
101
+ if all (x -> length (x ) >= 4 && x[ 4 ] == 0 , int_vars)
102
102
zguide --> " t"
103
103
end
104
104
@@ -236,12 +236,7 @@ function diffeq_to_arrays(sol,plot_analytic,denseplot,plotdensity,tspan,axis_saf
236
236
end
237
237
end
238
238
239
- dims = length (int_vars[1 ])
240
- for var in int_vars
241
- @assert length (var) == dims
242
- end
243
- # Should check that all have the same dims!
244
- plot_vecs,labels = solplot_vecs_and_labels (dims,int_vars,plot_timeseries,plott,sol,plot_analytic,plot_analytic_timeseries,strs)
239
+ plot_vecs,labels = solplot_vecs_and_labels (int_vars,plot_timeseries,plott,sol,plot_analytic,plot_analytic_timeseries,strs)
245
240
end
246
241
247
242
function interpret_vars (vars,sol,syms)
@@ -420,12 +415,12 @@ function u_n(timeseries::AbstractArray, n::Int,sol,plott,plot_timeseries)
420
415
end
421
416
end
422
417
423
- function solplot_vecs_and_labels (dims, vars,plot_timeseries,plott,sol,plot_analytic,plot_analytic_timeseries,strs)
418
+ function solplot_vecs_and_labels (vars,plot_timeseries,plott,sol,plot_analytic,plot_analytic_timeseries,strs)
424
419
plot_vecs = []
425
420
labels = String[]
426
421
for x in vars
427
422
tmp = []
428
- for j in 2 : dims
423
+ for j in 2 : length (x)
429
424
push! (tmp, u_n (plot_timeseries, x[j],sol,plott,plot_timeseries))
430
425
end
431
426
@@ -440,7 +435,7 @@ function solplot_vecs_and_labels(dims,vars,plot_timeseries,plott,sol,plot_analyt
440
435
end
441
436
push! (plot_vecs[i],tmp[i])
442
437
end
443
- add_labels! (labels,x,dims ,sol,strs)
438
+ add_labels! (labels,x,length (x) ,sol,strs)
444
439
end
445
440
446
441
@@ -449,7 +444,7 @@ function solplot_vecs_and_labels(dims,vars,plot_timeseries,plott,sol,plot_analyt
449
444
analytic_plot_vecs = []
450
445
for x in vars
451
446
tmp = []
452
- for j in 2 : dims
447
+ for j in 2 : length (x)
453
448
push! (tmp, u_n (plot_analytic_timeseries, x[j],sol,plott,plot_analytic_timeseries))
454
449
end
455
450
f = x[1 ]
@@ -458,7 +453,7 @@ function solplot_vecs_and_labels(dims,vars,plot_timeseries,plott,sol,plot_analyt
458
453
for i in eachindex (tmp)
459
454
push! (plot_vecs[i],tmp[i])
460
455
end
461
- add_analytic_labels! (labels,x,dims ,sol,strs)
456
+ add_analytic_labels! (labels,x,length (x) ,sol,strs)
462
457
end
463
458
end
464
459
plot_vecs = [hcat (x... ) for x in plot_vecs]
0 commit comments