How to plot a posterior check of a bivariate variable

@pymc-bot Hi, I’m just trying to plot the posterior of a bivariate poisson with coordiantes "dim_0" and "dim_1".

The dim_1 is the match and the dim_0 is the amout of goals scored by local and away team of that match.

Whe I call arviz.plot_ppc there is only one plot and I want the local and away distributions in difrente plots. Any hint is well recieved, thank you. I woudl like to plot it like this:

Also is there a way to change the legend?

I think you want to use the flatten argument of plot_ppc. It is used in the examples in the docstring to change the default behaviour: arviz.plot_ppc — ArviZ 0.21.0 documentation. I also wrote a blog post a while ago about that covers it in more detail: ArviZ in depth: plot_ppc — Oriol unraveled.

As a general recommendation I’d also recommend labeling your dimensions. Potentially useful references: PyMC 4.0 with labeled coords and dims — Oriol unraveled and Distribution Dimensionality — PyMC 5.23.0 documentation

1 Like

Thank you so much, Oriol. Your blogs are awesome, really appreciate them