guin0x
1
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
guin0x
2
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})
2 Likes
That is right. Moreover, if you define dimension or coordinate names you can use them as coords like in this example.
This blog post: https://oriolabrilpla.cat/en/blog/posts/2022/pymc-arviz.html might be helpful in navigating coords, dims and arviz-pymc integration
2 Likes