# How to plot beta\[363\] with \`az.plot\_trace\`

**URL:** <https://discourse.pymc.io/t/how-to-plot-beta-363-with-az-plot-trace/11078>\
**Category:** version agnostic\
**Tags:** modeling, arviz\
**Created:** [December 29, 2022, 9:57am UTC](https://discourse.pymc.io/t/how-to-plot-beta-363-with-az-plot-trace/11078 "2022-12-29T09:57:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guin0x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/guin0x/32/5929_2.png) [@guin0x](https://discourse.pymc.io/u/guin0x)\
**Post date:** [December 29, 2022, 9:57am UTC](https://discourse.pymc.io/t/how-to-plot-beta-363-with-az-plot-trace/11078/1 "2022-12-29T09:57:56Z")

</div>

The following code will plot the trace of all my betas (1700+)  
`az.plot_trace(idata_original, var_names = "beta")`

However, I would like to only plot some of them, say `beta[363]`, but I can’t figure out how to do it.

my beta is: `xarray.DataArray'beta'chain: 4draw: 1000beta_dim_0: 1761`

---

<div class="post-metadata">

**Author:** ![guin0x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/guin0x/32/5929_2.png) [@guin0x](https://discourse.pymc.io/u/guin0x)\
**Post date:** [December 29, 2022, 10:12am UTC](https://discourse.pymc.io/t/how-to-plot-beta-363-with-az-plot-trace/11078/2 "2022-12-29T10:12:55Z")

</div>

Hmm… I think I figured out the answer.

Someone correct me if I wrong but I believe this is the correct way to plot what I mentioned:

`az.plot_trace(idata_original, var_names='beta', coords={'beta_dim_0':363})`

---

<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:** [December 29, 2022, 3:54pm UTC](https://discourse.pymc.io/t/how-to-plot-beta-363-with-az-plot-trace/11078/3 "2022-12-29T15:54:51Z")

</div>

That is right. Moreover, if you define dimension or coordinate names you can use them as coords like in [this example](https://python.arviz.org/en/stable/user_guide/plots_arguments_guide.html#coords).

This blog post: [https://oriolabrilpla.cat/en/blog/posts/2022/pymc-arviz.html](https://oriolabrilpla.cat/en/blog/posts/2022/pymc-arviz.html) might be helpful in navigating coords, dims and arviz-pymc integration
