# DifferentialEquations & Plots -- transforming solutions before plot

**URL:** <https://discourse.julialang.org/t/differentialequations-plots-transforming-solutions-before-plot/37122>\
**Category:** General Usage\
**Created:** [April 6, 2020, 5:51pm UTC](https://discourse.julialang.org/t/differentialequations-plots-transforming-solutions-before-plot/37122 "2020-04-06T17:51:00Z")\
**Posts on this page:** 1\
**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:** [April 6, 2020, 5:51pm UTC](https://discourse.julialang.org/t/differentialequations-plots-transforming-solutions-before-plot/37122/1 "2020-04-06T17:51:00Z")

</div>

I have computed `sol` from DifferentialEquations, and need to transform selected values before plotting them. Specifically, I want to convert values from fraction to percentage (`f2p`).

Suppose I want transform a single variable, say variable nr. `2`. I can do that by:

```julia
f2p = (t,x) -> (t,100x)
plot(sol,vars=(f2p,0,2))

```

Next, suppose I want to plot variable nr. `1`, `2`, and `4`:

```julia
plot(sol,vars=(0,[1,2,4]))

```

Question:

- Is there a way to use the same mapping to percentage on variables `1`, `2`, `4` in a single plot command?

The following does _not_ work:

```julia
plot(sol, vars=(f2p,0,[1,2,4]))

```

Is there a way to do this without doing it the “hard” way:

```julia
plot(sol, vars=(f2p,0,1))
plot!(sol, vars=(f2p,0,2))
plot!(sol, vars=(f2p,0,3))

```

?
