# What does vars do in plot?

**URL:** <https://discourse.julialang.org/t/what-does-vars-do-in-plot/97642>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [April 19, 2023, 8:01am UTC](https://discourse.julialang.org/t/what-does-vars-do-in-plot/97642 "2023-04-19T08:01:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Random\_0826](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/random_0826/32/49128_2.png) [@Random\_0826](https://discourse.julialang.org/u/Random_0826)\
**Post date:** [April 19, 2023, 8:01am UTC](https://discourse.julialang.org/t/what-does-vars-do-in-plot/97642/1 "2023-04-19T08:01:26Z")

</div>

Hello. I am using Julia for my research, and I have question.  
What does ‘vars’ do in plot?

For example, when I put ‘vars=(0, [1, 2])’ in plot function, what does this mean?  
I know that changing vars affects the plot, but I could not understand what it do actually.  
I found some answers about this, but I could not understand how it works.

Thank you.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [April 19, 2023, 8:26am UTC](https://discourse.julialang.org/t/what-does-vars-do-in-plot/97642/2 "2023-04-19T08:26:24Z")

</div>

Does this help?

> <https://stackoverflow.com/questions/46601639/vars-argument-in-plot-function-in-julia>

---

<div class="post-metadata">

**Author:** ![Random\_0826](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/random_0826/32/49128_2.png) [@Random\_0826](https://discourse.julialang.org/u/Random_0826)\
**Post date:** [April 19, 2023, 8:35am UTC](https://discourse.julialang.org/t/what-does-vars-do-in-plot/97642/3 "2023-04-19T08:35:26Z")

</div>

I read this page, but I can’t find any ‘vars’ in the website in the answer at that page.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [April 19, 2023, 8:52am UTC](https://discourse.julialang.org/t/what-does-vars-do-in-plot/97642/4 "2023-04-19T08:52:14Z")

</div>

That answer is a few years old and DiffEq has seen a lot of breaking changes, but e.g. version 6 has `vars` in the docs:

[https://docs.sciml.ai/DiffEqDocs/v6.19/basics/plot/#plot\_vars](https://docs.sciml.ai/DiffEqDocs/v6.19/basics/plot/#plot_vars)

---

<div class="post-metadata">

**Author:** ![Random\_0826](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/random_0826/32/49128_2.png) [@Random\_0826](https://discourse.julialang.org/u/Random_0826)\
**Post date:** [April 19, 2023, 8:58am UTC](https://discourse.julialang.org/t/what-does-vars-do-in-plot/97642/5 "2023-04-19T08:58:10Z")

</div>

Thank you! This is exactly what I was looking for!
