How to plot beta[363] with `az.plot_trace`

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

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})

1 Like

That is right. Moreover, if you define dimension or coordinate names you can use them as coords like in this example.

This blog post: might be helpful in navigating coords, dims and arviz-pymc integration

1 Like