# Change the names of variables in Arviz Plot

**URL:** <https://discourse.pymc.io/t/change-the-names-of-variables-in-arviz-plot/9167>\
**Category:** v3\
**Tags:** arviz\
**Created:** [April 6, 2022, 5:51pm UTC](https://discourse.pymc.io/t/change-the-names-of-variables-in-arviz-plot/9167 "2022-04-06T17:51:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skysthelimit](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/skysthelimit/32/4493_2.png) [@skysthelimit](https://discourse.pymc.io/u/skysthelimit)\
**Post date:** [April 6, 2022, 5:51pm UTC](https://discourse.pymc.io/t/change-the-names-of-variables-in-arviz-plot/9167/1 "2022-04-06T17:51:23Z")

</div>

Hello all,

I’m trying to find a work around for how to label the y axis labels in my arviz.plot\_forest. The problem seems to relate to the code here:

```auto
az.plot_forest(
    idata_list, 
    var_names="beta_continuous", 
    figsize=(6, 32), 
    r_hat=False, 
    combined=True, 
    textsize=8, 
    hdi_prob=0.95, 
    quartiles=False
);

```

where `beta_continuous` is defined here:

```auto
# Continuous feature coefficients
            beta_continuous_offset = pm.Normal(
                "beta_continuous_offset", 0.0, 1.0, dims="continuous"
            )
            beta_continuous = pm.Deterministic(
                "beta_continuous",
                mu_beta_continuous + sigma_beta_continuous * beta_continuous_offset,
            )

```

The `beta_continuous` variable isn’t inheriting the labels from the `beta_continuous_offset` term so I’m getting a plot that looks like this:

 ![Screen Shot 2022-04-06 at 10.18.18 AM](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/6/6f3769e117ab1f2a7574a3c60f152c457d0f7c1c.png)

If anybody knows how I can swap the [0], [1], [2],… with labels of my own choosing, I would really appreciate it. Thank you!

---

<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:** [April 6, 2022, 6:57pm UTC](https://discourse.pymc.io/t/change-the-names-of-variables-in-arviz-plot/9167/2 "2022-04-06T18:57:50Z")

</div>

Dimensions don’t propagate in PyMC (and inputs don’t align and broadcast either), that is something that happens only with the outputs when using `InferenceData` thanks to xarray.

Therefore, you need to annotate the dimension in `beta_continuous` too:

```auto
beta_continuous = pm.Deterministic(
    "beta_continuous",
    mu_beta_continuous + sigma_beta_continuous * beta_continuous_offset,
    dims="continuous"
)

```

This will make `beta_continuous` in the output to also have the same coordinate values and dimensions, and (if using a recent enough version of arviz) the plots will also use that information.

For further customization of the plotting labels you can read [Label guide — ArviZ dev documentation](https://arviz-devs.github.io/arviz/user_guide/label_guide.html)
