# Lines on traceplot

**URL:** <https://discourse.pymc.io/t/lines-on-traceplot/6992>\
**Category:** Questions\
**Created:** [March 15, 2021, 2:48pm UTC](https://discourse.pymc.io/t/lines-on-traceplot/6992 "2021-03-15T14:48:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nn\_Nnn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/nn_nnn/32/3790_2.png) [@Nn\_Nnn](https://discourse.pymc.io/u/Nn_Nnn)\
**Post date:** [March 15, 2021, 2:48pm UTC](https://discourse.pymc.io/t/lines-on-traceplot/6992/1 "2021-03-15T14:48:05Z")

</div>

Is there an easy way to add lines to a traceplot:

```
pm.traceplot(trace, var_names = ["mu","sd"], lines={'mu':2,"sd":1})

```

The argument “lines =” appears to no longer work.  
it used to be supported in pymc3.  
Is there a very easy alternative since I am new to both python and PYMC3.  
I am following Osvaldo Martin’s book which also uses similar code. thanks in advance.

---

<div class="post-metadata">

**Author:** ![OriolAbril](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/oriolabril/32/2497_2.png) [@OriolAbril](https://discourse.pymc.io/u/OriolAbril)\
**Post date:** [March 15, 2021, 6:41pm UTC](https://discourse.pymc.io/t/lines-on-traceplot/6992/2 "2021-03-15T18:41:04Z")

</div>

The formatting of the lines argument was modified to be more flexible, I have several examples of using the `lines` argument in my blog [ArviZ in depth: plot\_trace | Oriol unraveled](https://oriolabril.github.io/oriol_unraveled/python/arviz/matplotlib/2020/06/20/plot-trace.html).

I would also recommend using arviz explicitly `az.plot_trace` or if you want to avoid adding a new namespace to your code, use the aliases to arviz functions provided by pymc3 (make sure to install the latest version), `pm.plot_trace`.

---

<div class="post-metadata">

**Author:** ![Nn\_Nnn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/nn_nnn/32/3790_2.png) [@Nn\_Nnn](https://discourse.pymc.io/u/Nn_Nnn)\
**Post date:** [March 16, 2021, 3:55pm UTC](https://discourse.pymc.io/t/lines-on-traceplot/6992/3 "2021-03-16T15:55:07Z")

</div>

Thanks Oriol, I will use az.plot\_trace as you suggested. I look forward to studying your Blog on Traceplot. Your blog looks brialiant and makes a good starting point for the novice. I hope you sometime write something similar for Post Predictive Checks in a simple form that a novice can understand. thank you again for your help.
