Change to MTK plotting?

I just updated Julia to v1.10, and now plotting results from MTK models do not work as before.

Consider a solution structure sol from an MTK model:

julia> sol(0.5, idxs=[r2m.Vd_v, r2m.Dp_p])
2-element Vector{Float64}:

which is like before. HOWEVER, when I do plotting, the following syntax used to work (but not any more):

julia> plot(sol, idxs=[r2m.Vd_v, r2m.Dp_p])
TypeError: non-boolean (SymbolicUtils.BasicSymbolic{Bool}) used in boolean context...

Is there a change in syntax?

1 Like

The SymbolicIndexingInterface v3 release was quite a bit disruptive because the plotting mechanism was really old and didn’t actually use the symbolic indexing interface of the solution. I just fixed that today Change the plot recipes to use the SymbolicIndexingInterface by ChrisRackauckas · Pull Request #572 · SciML/SciMLBase.jl · GitHub so wait about an hour and it should all be good again.

And to be clear, the syntax should not change. All plots from before should work. It should be more robust for the future too since it now uses a real interface (the thing from before was hacked onto the 2016 implementation since symbolic indexing came after the plotting functionality had been around for years :sweat_smile:)


Try updating now.


Thanks for the reassurance about the syntax :-).

Plotting works again!