# Change to MTK plotting?

**URL:** https://discourse.julialang.org/t/change-to-mtk-plotting/108109
**Category:** Modelling & Simulations
**Created:** [December 27, 2023, 7:44pm UTC](https://discourse.julialang.org/t/change-to-mtk-plotting/108109 "2023-12-27T19:44:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [December 27, 2023, 7:44pm UTC](https://discourse.julialang.org/t/change-to-mtk-plotting/108109/1 "2023-12-27T19:44:47Z")

</div>

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
julia> sol(0.5, idxs=[r2m.Vd_v, r2m.Dp_p])
2-element Vector{Float64}:
 0.02270234313324471
 6.7876702627884885e6

```

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

```julia
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?

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [December 27, 2023, 8:55pm UTC](https://discourse.julialang.org/t/change-to-mtk-plotting/108109/2 "2023-12-27T20:55:44Z")

</div>

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](https://github.com/SciML/SciMLBase.jl/pull/572) 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 😅)

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [December 27, 2023, 9:02pm UTC](https://discourse.julialang.org/t/change-to-mtk-plotting/108109/3 "2023-12-27T21:02:32Z")

</div>

Try updating now.

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [December 27, 2023, 9:03pm UTC](https://discourse.julialang.org/t/change-to-mtk-plotting/108109/4 "2023-12-27T21:03:05Z")

</div>

Thanks for the reassurance about the syntax :-).

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [December 28, 2023, 9:15am UTC](https://discourse.julialang.org/t/change-to-mtk-plotting/108109/5 "2023-12-28T09:15:56Z")

</div>

Plotting works again!
